Calendar - for "REAL" programmers: Difference between revisions
Content added Content deleted
m (Fixed 2 spelling errors) |
|||
Line 1,047: | Line 1,047: | ||
=={{header|Elena}}== |
=={{header|Elena}}== |
||
ELENA 4. |
ELENA 4.1 : |
||
<lang elena>import system'text; |
<lang elena>import system'text; |
||
import system'routines; |
import system'routines; |
||
Line 1,054: | Line 1,054: | ||
import extensions'routines; |
import extensions'routines; |
||
const MonthNames = new string[] |
const MonthNames = new string[]::("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"); |
||
const DayNames = new string[] |
const DayNames = new string[]::("MO", "TU", "WE", "TH", "FR", "SA", "SU"); |
||
class CalendarMonthPrinter |
class CalendarMonthPrinter |
||
Line 1,089: | Line 1,089: | ||
theLine.writeCopies(" ",theDate.DayOfWeek == 0 ? 7 : (theDate.DayOfWeek - 1)); |
theLine.writeCopies(" ",theDate.DayOfWeek == 0 ? 7 : (theDate.DayOfWeek - 1)); |
||
do |
|||
⚫ | |||
{ |
{ |
||
theLine.writePaddingLeft(theDate.Day.Printable, $32, 3); |
theLine.writePaddingLeft(theDate.Day.Printable, $32, 3); |
||
theDate := theDate.addDays:1 |
theDate := theDate.addDays:1 |
||
} |
} |
||
⚫ | |||
}; |
}; |
||