Calendar: Difference between revisions

→‎{{header|Ruby}}: removed reference to ruby 1.8.7 - it's unsupported
m (→‎{{header|REXX}}: reinstated original whitespace.)
(→‎{{header|Ruby}}: removed reference to ruby 1.8.7 - it's unsupported)
Line 2,899:
<code>Date</code> class, from the standard library, knows how many days in a month, and which day is Sunday, for both Julian and Gregorian calendars. This program uses <code>Date</code> class, plus its own assumptions, to create the calendar. This program assumes that every year has 12 months and starts with January 1, and every month fits in 6 weeks starting with Sunday.
 
* This program requires Ruby 1.8.7 because it calls Array#each_slice.
 
{{works with|Ruby|1.8.7}}
<lang ruby>require 'date'
 
1,149

edits