Class: Temporal::PlainDateTime
- Inherits:
-
Object
- Object
- Temporal::PlainDateTime
- Defined in:
- lib/temporal/plain_date_time.rb
Instance Method Summary collapse
- #calendar_id ⇒ Object
- #day ⇒ Object
- #era ⇒ Object
- #era_year ⇒ Object
- #hour ⇒ Object
-
#initialize(year, month, day, hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0, calendar_id: nil) ⇒ PlainDateTime
constructor
A new instance of PlainDateTime.
- #microsecond ⇒ Object
- #millisecond ⇒ Object
- #minute ⇒ Object
- #month ⇒ Object
- #month_code ⇒ Object
- #nanosecond ⇒ Object
- #second ⇒ Object
- #year ⇒ Object
Constructor Details
#initialize(year, month, day, hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0, calendar_id: nil) ⇒ PlainDateTime
Returns a new instance of PlainDateTime.
5 6 7 8 9 10 |
# File 'lib/temporal/plain_date_time.rb', line 5 def initialize(year, month, day, hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0, calendar_id: nil) @date = PlainDate.new(year, month, day, calendar_id: calendar_id) @time = PlainTime.new(hour, minute, second, millisecond, microsecond, nanosecond) end |
Instance Method Details
#calendar_id ⇒ Object
25 |
# File 'lib/temporal/plain_date_time.rb', line 25 def calendar_id = @date.calendar_id |
#day ⇒ Object
14 |
# File 'lib/temporal/plain_date_time.rb', line 14 def day = @date.day |
#era ⇒ Object
15 |
# File 'lib/temporal/plain_date_time.rb', line 15 def era = @date.era |
#era_year ⇒ Object
16 |
# File 'lib/temporal/plain_date_time.rb', line 16 def era_year = @date.era_year |
#hour ⇒ Object
19 |
# File 'lib/temporal/plain_date_time.rb', line 19 def hour = @time.hour |
#microsecond ⇒ Object
23 |
# File 'lib/temporal/plain_date_time.rb', line 23 def microsecond = @time.microsecond |
#millisecond ⇒ Object
22 |
# File 'lib/temporal/plain_date_time.rb', line 22 def millisecond = @time.millisecond |
#minute ⇒ Object
20 |
# File 'lib/temporal/plain_date_time.rb', line 20 def minute = @time.minute |
#month ⇒ Object
13 |
# File 'lib/temporal/plain_date_time.rb', line 13 def month = @date.month |
#month_code ⇒ Object
17 |
# File 'lib/temporal/plain_date_time.rb', line 17 def month_code = @date.month_code |
#nanosecond ⇒ Object
24 |
# File 'lib/temporal/plain_date_time.rb', line 24 def nanosecond = @time.nanosecond |
#second ⇒ Object
21 |
# File 'lib/temporal/plain_date_time.rb', line 21 def second = @time.second |
#year ⇒ Object
12 |
# File 'lib/temporal/plain_date_time.rb', line 12 def year = @date.year |