Class: Google::Apis::DocsV1::DateElementProperties
- Inherits:
-
Object
- Object
- Google::Apis::DocsV1::DateElementProperties
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/docs_v1/classes.rb,
lib/google/apis/docs_v1/representations.rb,
lib/google/apis/docs_v1/representations.rb
Overview
Properties of a DateElement.
Instance Attribute Summary collapse
-
#date_format ⇒ String
Determines how the date part of the DateElement will be displayed in the document.
-
#display_text ⇒ String
Output only.
-
#locale ⇒ String
The locale of the document, as defined by the Unicode Common Locale Data Repository (CLDR) project.
-
#time_format ⇒ String
Determines how the time part of the DateElement will be displayed in the document.
-
#time_zone_id ⇒ String
The time zone of the DateElement, as defined by the Unicode Common Locale Data Repository (CLDR) project.
-
#timestamp ⇒ String
The point in time to represent, in seconds and nanoseconds since Unix epoch: January 1, 1970 at midnight UTC.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DateElementProperties
constructor
A new instance of DateElementProperties.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DateElementProperties
Returns a new instance of DateElementProperties.
745 746 747 |
# File 'lib/google/apis/docs_v1/classes.rb', line 745 def initialize(**args) update!(**args) end |
Instance Attribute Details
#date_format ⇒ String
Determines how the date part of the DateElement will be displayed in the
document. If unset, the default value is
DATE_FORMAT_MONTH_DAY_YEAR_ABBREVIATED, indicating the DateElement will be
formatted as MMM d, y in en_US, or locale specific equivalent.
Corresponds to the JSON property dateFormat
705 706 707 |
# File 'lib/google/apis/docs_v1/classes.rb', line 705 def date_format @date_format end |
#display_text ⇒ String
Output only. Indicates how the DateElement is displayed in the document.
Corresponds to the JSON property displayText
710 711 712 |
# File 'lib/google/apis/docs_v1/classes.rb', line 710 def display_text @display_text end |
#locale ⇒ String
The locale of the document, as defined by the Unicode Common Locale Data
Repository (CLDR) project. For example, en_US. If unset, the default locale
is en_US.
Corresponds to the JSON property locale
717 718 719 |
# File 'lib/google/apis/docs_v1/classes.rb', line 717 def locale @locale end |
#time_format ⇒ String
Determines how the time part of the DateElement will be displayed in the
document. If unset, the default value is TIME_FORMAT_DISABLED, indicating no
time should be shown.
Corresponds to the JSON property timeFormat
724 725 726 |
# File 'lib/google/apis/docs_v1/classes.rb', line 724 def time_format @time_format end |
#time_zone_id ⇒ String
The time zone of the DateElement, as defined by the Unicode Common Locale Data
Repository (CLDR) project. For example, America/New York. If unset, the
default time zone is etc/UTC.
Corresponds to the JSON property timeZoneId
731 732 733 |
# File 'lib/google/apis/docs_v1/classes.rb', line 731 def time_zone_id @time_zone_id end |
#timestamp ⇒ String
The point in time to represent, in seconds and nanoseconds since Unix epoch:
January 1, 1970 at midnight UTC. Timestamp is expected to be in UTC. If
time_zone_id is set, the timestamp is adjusted according to the time zone. For
example, a timestamp of 18000 with a date format of DATE_FORMAT_ISO8601
and time format of TIME_FORMAT_HOUR_MINUTE would be displayed as 1970-01-01
5:00 AM. A timestamp of 18000 with date format of DATE_FORMAT_8SO8601,
time format of TIME_FORMAT_HOUR_MINUTE, and time zone set to America/
New_York will instead be 1970-01-01 12:00 AM.
Corresponds to the JSON property timestamp
743 744 745 |
# File 'lib/google/apis/docs_v1/classes.rb', line 743 def end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
750 751 752 753 754 755 756 757 |
# File 'lib/google/apis/docs_v1/classes.rb', line 750 def update!(**args) @date_format = args[:date_format] if args.key?(:date_format) @display_text = args[:display_text] if args.key?(:display_text) @locale = args[:locale] if args.key?(:locale) @time_format = args[:time_format] if args.key?(:time_format) @time_zone_id = args[:time_zone_id] if args.key?(:time_zone_id) = args[:timestamp] if args.key?(:timestamp) end |