Class: Google::Apis::SheetsV4::DateTimeRule
- Inherits:
-
Object
- Object
- Google::Apis::SheetsV4::DateTimeRule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/sheets_v4/classes.rb,
generated/google/apis/sheets_v4/representations.rb,
generated/google/apis/sheets_v4/representations.rb
Overview
Allows you to organize the date-time values in a source data column into buckets based on selected parts of their date or time values. For example, consider a pivot table showing sales transactions by date: +----------+--------------+ | Date | SUM of Sales | +----------+--------------+ | 1/1/2017 | $621.14 | | 2/3/2017 | $708.84 | | 5/8/2017 | $326.84 | ... +----------+--------------+ Applying a date-time group rule with a DateTimeRuleType of YEAR_MONTH results in the following pivot table. +--------------+--------------+ | Grouped Date | SUM of Sales | +--------------+--------------+ | 2017-Jan | $53,731.78 | | 2017-Feb | $83,475.32 | | 2017-Mar | $94,385.05 | ... +--------------+--------------+
Instance Attribute Summary collapse
-
#type ⇒ String
The type of date-time grouping to apply.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DateTimeRule
constructor
A new instance of DateTimeRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ DateTimeRule
Returns a new instance of DateTimeRule
3619 3620 3621 |
# File 'generated/google/apis/sheets_v4/classes.rb', line 3619 def initialize(**args) update!(**args) end |
Instance Attribute Details
#type ⇒ String
The type of date-time grouping to apply.
Corresponds to the JSON property type
3617 3618 3619 |
# File 'generated/google/apis/sheets_v4/classes.rb', line 3617 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3624 3625 3626 |
# File 'generated/google/apis/sheets_v4/classes.rb', line 3624 def update!(**args) @type = args[:type] if args.key?(:type) end |