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.



853
854
855
# File 'lib/google/apis/docs_v1/classes.rb', line 853

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)


813
814
815
# File 'lib/google/apis/docs_v1/classes.rb', line 813

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)


818
819
820
# File 'lib/google/apis/docs_v1/classes.rb', line 818

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)


825
826
827
# File 'lib/google/apis/docs_v1/classes.rb', line 825

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)


832
833
834
# File 'lib/google/apis/docs_v1/classes.rb', line 832

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)


839
840
841
# File 'lib/google/apis/docs_v1/classes.rb', line 839

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)


851
852
853
# File 'lib/google/apis/docs_v1/classes.rb', line 851

def timestamp
  @timestamp
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



858
859
860
861
862
863
864
865
# File 'lib/google/apis/docs_v1/classes.rb', line 858

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