Calendar - for "REAL" programmers: Difference between revisions

m
m (Fixed 2 spelling errors)
Line 1,047:
 
=={{header|Elena}}==
ELENA 4.x1 :
<lang elena>import system'text;
import system'routines;
Line 1,054:
import extensions'routines;
 
const MonthNames = new string[] {::("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"});
const DayNames = new string[] {::("MO", "TU", "WE", "TH", "FR", "SA", "SU"});
 
class CalendarMonthPrinter
Line 1,089:
theLine.writeCopies(" ",theDate.DayOfWeek == 0 ? 7 : (theDate.DayOfWeek - 1));
do
doUntil(theDate.Month != theMonth || theDate.DayOfWeek == 1)
{
theLine.writePaddingLeft(theDate.Day.Printable, $32, 3);
theDate := theDate.addDays:1
}
doUntiluntil:(theDate.Month != theMonth || theDate.DayOfWeek == 1)
};
Anonymous user