Class: Date

Inherits:
Object
  • Object
show all
Defined in:
lib/supplement/date.rb,
lib/supplement/date.rb

Direct Known Subclasses

DateTime

Instance Method Summary collapse

Instance Method Details

#dObject



11
# File 'lib/supplement/date.rb', line 11

def d ; day   ; end

#mObject



10
# File 'lib/supplement/date.rb', line 10

def m ; month ; end

#to_aObject



13
# File 'lib/supplement/date.rb', line 13

def to_a ; [ year, month, day ] ; end

#to_dateObject



38
# File 'lib/supplement/date.rb', line 38

def to_date     ; self ; end

#to_datetimeObject



39
# File 'lib/supplement/date.rb', line 39

def to_datetime ; DateTime.new! Date.jd_to_ajd(jd,0,0), @of, @sg ; end

#to_timeObject



37
# File 'lib/supplement/date.rb', line 37

def to_time     ; Time.local year, mon, mday ; end

#yObject



9
# File 'lib/supplement/date.rb', line 9

def y ; year  ; end