Class: Date

Inherits:
Object
  • Object
show all
Defined in:
lib/parsi-date.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.parsi(year = 0, month = 1, day = 1) ⇒ Object Also known as: jalali

Creates a Date object corresponding to the specified Jalali Date year, month and day.


729
730
731
# File 'lib/parsi-date.rb', line 729

def parsi year=0, month=1, day=1
  Parsi::Date.civil year, month, day
end

Instance Method Details

#to_parsiObject Also known as: jalali, to_jalali, to_persian

Returns a Parsi::Date object representing same date in Jalali calendar


736
737
738
# File 'lib/parsi-date.rb', line 736

def to_parsi
  Parsi::Date.new! ajd, offset
end