Class: Google::Apis::WalletobjectsV1::DateTime

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/walletobjects_v1/classes.rb,
lib/google/apis/walletobjects_v1/representations.rb,
lib/google/apis/walletobjects_v1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DateTime

Returns a new instance of DateTime.



915
916
917
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 915

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#dateString

An ISO 8601 extended format date/time. Offset may or may not be required ( refer to the parent field's documentation). Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601). For example: 1985-04-12T23:20: 50.52Z would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC. 1985-04-12T19:20:50.52-04:00 would be 20 minutes and 50. 52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the date/time is intended for a physical location in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year. 1985-04-12T19:20:50.52 would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information. Providing an offset makes this an absolute instant in time around the world. The date/time will be adjusted based on the user's time zone. For example, a time of 2018-06-19T18: 30:00-04:00 will be 18:30:00 for a user in New York and 15:30:00 for a user in Los Angeles. Omitting the offset makes this a local date/time, representing several instants in time around the world. The date/time will always be in the user's current time zone. For example, a time of 2018-06-19T18:30:00 will be 18:30:00 for a user in New York and also 18:30:00 for a user in Los Angeles. This is useful when the same local date/time should apply to many physical locations across several time zones. Corresponds to the JSON property date

Returns:

  • (String)


913
914
915
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 913

def date
  @date
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



920
921
922
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 920

def update!(**args)
  @date = args[:date] if args.key?(:date)
end