Class: Google::Apis::HealthV4::CivilDateTime

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

Overview

Civil time representation similar to google.type.DateTime, but ensures that neither the timezone nor the UTC offset can be set to avoid confusion between civil and physical time queries.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CivilDateTime

Returns a new instance of CivilDateTime.



477
478
479
# File 'lib/google/apis/health_v4/classes.rb', line 477

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

Instance Attribute Details

#dateGoogle::Apis::HealthV4::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property date



468
469
470
# File 'lib/google/apis/health_v4/classes.rb', line 468

def date
  @date
end

#timeGoogle::Apis::HealthV4::TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp. Corresponds to the JSON property time



475
476
477
# File 'lib/google/apis/health_v4/classes.rb', line 475

def time
  @time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



482
483
484
485
# File 'lib/google/apis/health_v4/classes.rb', line 482

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