to_json

to_json(*args) Instance Public methods Stores class name (Date) with Julian year y, month m, day d and Day of Calendar Reform sg as JSON string

to_datetime

d.to_datetime â datetime Instance Public methods Returns a DateTime object which denotes self.

to_date

d.to_date â self Instance Public methods Returns self;

thursday?

d.thursday? â bool Instance Public methods Returns true if the date is Thursday.

sunday?

d.sunday? â bool Instance Public methods Returns true if the date is Sunday.

succ

d.next â date Instance Public methods Returns a date object denoting the following day.

strftime

d.strftime([format='%F']) â string Instance Public methods Formats date according to the directives in the given format string. The directives begins with a percent (%) character. Any text not listed as a directive will be passed through to the output string. The directive consists of a percent (%) character, zero or more flags, optional minimum field width, optional modifier and a conversion specifier as follows. %<flags><width><modifier><conversion>

step

d.step(limit[, step=1]) â enumeratord.step(limit[, step=1]){|date| ...} â self Instance Public methods Iterates evaluation of the given block, which takes a date object. The limit should be a date object. Date.new(2001).step(Date.new(2001,-1,-1)).select{|d| d.sunday?}.size #=> 52

start

d.start â float Instance Public methods Returns the Julian day number denoting the day of calendar reform. Date.new(2001,2,3).start #=> 2299161.0 Date.new(2001,2,3,Date::GREGORIAN).start #=> -Infinity

saturday?

d.saturday? â bool Instance Public methods Returns true if the date is Saturday.