This method is equivalent to d - n.
This method is equivalent to d << (n * 12).
Date.new(2001,2,3).prev_year #=> #<Date: 2000-02-03 ...> Date.new(2008,2,29).prev_year #=> #<Date: 2007-02-28 ...> Date.new(2008,2,29).prev_year(4) #=> #<Date: 2004-02-29 ...>
See also Date#<<
.
Returns a Time
object which denotes self.
Returns self.
Returns a DateTime
object which denotes self.
Deserializes JSON
string by converting Julian year y
, month m
, day d
and Day of Calendar Reform sg
to Date
.
Stores class name (Date
) with Julian year y
, month m
, day d
and Day of Calendar Reform sg
as JSON
string
Returns a Time
object which denotes self.
Returns a Date
object which denotes self.
Returns self.
Deserializes JSON
string by converting year y
, month m
, day d
, hour H
, minute M
, second S
, offset of
and Day of Calendar Reform sg
to DateTime
.
Stores class name (DateTime
) with Julian year y
, month m
, day d
, hour H
, minute M
, second S
, offset of
and Day of Calendar Reform sg
as JSON
string
Returns self.
Returns a Date
object which denotes self.
Returns a DateTime
object which denotes self.
Stores class name (Time
) with number of seconds since epoch and number of microseconds for Time
as JSON
string
Converts the contents of the database to an in-memory Hash
object, and returns it.
Waits until IO
is readable without blocking and returns self
, or nil
when times out. Returns true
immediately when buffered data is available.
Synonym for IO.new
.
Returns ios.