Class: DateTime::AllLeap

Inherits:
DateTimeLike show all
Extended by:
ParseTimeStampExtension, DateTimeLikeExtension
Defined in:
lib/timesteps/datetimelike.rb,
lib/timesteps/parse_timestamp.rb

Overview

datetime class represents ‘allleap` or `366_day` calendar

Constant Summary collapse

DPY =

Number of days per year

366
DPM =

Numbers of days per months

[0,31,29,31,30,31,30,31,31,30,31,30,31]
UNIX_EPOCH_IN_AJD =

Astronomical Julian day number of UNIX epoch

Rational(4891223,2)

Constants inherited from DateTimeLike

DateTimeLike::ABBR_DAYNAMES, DateTimeLike::ABBR_MONTHNAMES, DateTimeLike::DAYNAMES, DateTimeLike::MILLISECONDS_IN_DAY, DateTimeLike::MILLISECONDS_IN_SECOND, DateTimeLike::MONTHNAMES, DateTimeLike::NANOSECONDS_IN_DAY, DateTimeLike::NANOSECONDS_IN_SECOND, DateTimeLike::SECONDS_IN_DAY

Instance Attribute Summary

Attributes inherited from DateTimeLike

#day, #hour, #minute, #month, #offset, #year

Instance Method Summary collapse

Methods included from ParseTimeStampExtension

parse_timestamp

Methods inherited from DateTimeLike

#+, #-, #<<, #<=>, #>>, #ajd, #compare_d, #compare_md, #difference_in_months, #difference_in_years, #fraction, #initialize, #inspect, #jd, #new_offset, #next_day, #next_month, #next_year, #prev_day, #prev_month, #prev_year, #second, #second_fraction, #strftime, #succ, #to_s, #wday, #yday

Constructor Details

This class inherits a constructor from DateTimeLike

Instance Method Details

#leap?Boolean

Returns:

  • (Boolean)


489
490
491
# File 'lib/timesteps/datetimelike.rb', line 489

def leap?
  true
end