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 language code of the DateElement.
-
#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.
859 860 861 |
# File 'lib/google/apis/docs_v1/classes.rb', line 859 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, or locale specific equivalent.
Corresponds to the JSON property dateFormat
813 814 815 |
# File 'lib/google/apis/docs_v1/classes.rb', line 813 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
818 819 820 |
# File 'lib/google/apis/docs_v1/classes.rb', line 818 def display_text @display_text end |
#locale ⇒ String
The language code of the DateElement. For example, en. If unset, the default
locale is en. Limited to the following locales: af, am, ar, as, az,
be, bg, bn, ca, cs, da, de, el, en, en-CA, en-GB, es,
es-419, et, eu, fa, fi, fil, fr, fr-CA, gl, gu, hi, hr,
hu, hy, id, is, it, iw, ja, ka, kk, km, kn, ko, lo,
lt, lv, mk, ml, mn, mr, ms, ne, nl, no, or, pa, pl,
pt-BR, pt-PT, ro, ru, si, sk, sl, sq, sr, sv, sw, ta,
te, th, tr, uk, ur, uz, vi, zh-CN, zh-HK, zh-TW, zu, cy,
my.
Corresponds to the JSON property locale
831 832 833 |
# File 'lib/google/apis/docs_v1/classes.rb', line 831 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
838 839 840 |
# File 'lib/google/apis/docs_v1/classes.rb', line 838 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
845 846 847 |
# File 'lib/google/apis/docs_v1/classes.rb', line 845 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_ISO8601,
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
857 858 859 |
# File 'lib/google/apis/docs_v1/classes.rb', line 857 def @timestamp end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
864 865 866 867 868 869 870 871 |
# File 'lib/google/apis/docs_v1/classes.rb', line 864 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) @timestamp = args[:timestamp] if args.key?(:timestamp) end |