Calendar forms : Date.new « Date « Ruby






Calendar forms


# A date can conform to the Gregorian or Julian calendar by adding a fourth argument to new

require 'date'

gdate = Date.new( 2006, 11, 8, "Gregorian" )

jdate = Date.new( 2006, 11, 8, "Julian" )

 








Related examples in the same category

1.The Date Class
2.Use expression substitution to show the date in a user-specified format.
3.In Italy, 4 Oct 1582 was immediately followed by 15 Oct 1582.
4.In England, 2 Sep 1752 was immediately followed by 14 Sep 1752.