Class: Google::Apis::DocsV1::DateElementProperties

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_formatString

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

Returns:

  • (String)


705
706
707
# File 'lib/google/apis/docs_v1/classes.rb', line 705

def date_format
  @date_format
end

#display_textString

Output only. Indicates how the DateElement is displayed in the document. Corresponds to the JSON property displayText

Returns:

  • (String)


710
711
712
# File 'lib/google/apis/docs_v1/classes.rb', line 710

def display_text
  @display_text
end

#localeString

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

Returns:

  • (String)


717
718
719
# File 'lib/google/apis/docs_v1/classes.rb', line 717

def locale
  @locale
end

#time_formatString

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

Returns:

  • (String)


724
725
726
# File 'lib/google/apis/docs_v1/classes.rb', line 724

def time_format
  @time_format
end

#time_zone_idString

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

Returns:

  • (String)


731
732
733
# File 'lib/google/apis/docs_v1/classes.rb', line 731

def time_zone_id
  @time_zone_id
end

#timestampString

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

Returns:

  • (String)


743
744
745
# File 'lib/google/apis/docs_v1/classes.rb', line 743

def timestamp
  @timestamp
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)
  @timestamp = args[:timestamp] if args.key?(:timestamp)
end