Method: Date#initialize

Defined in:
lib/rubysl/date/date.rb

#initialize(ajd = 0, of = 0, sg = ITALY) ⇒ Date

NOTE this is the documentation for the method new!(). If you are reading this as the documentation for new(), that is because rdoc doesn’t fully support the aliasing of the initialize() method. new() is in fact an alias for #civil(): read the documentation for that method instead.

Create a new Date object.

ajd is the Astronomical Julian Day Number. of is the offset from UTC as a fraction of a day. Both default to 0.

sg specifies the Day of Calendar Reform to use for this Date object.

Using one of the factory methods such as Date::civil is generally easier and safer.



1141
1142
1143
1144
# File 'lib/rubysl/date/date.rb', line 1141

def initialize(ajd=0, of=0, sg=ITALY)
  @ajd, @of, @sg = ajd, of, sg
  @__ca__ = {}
end