Jump to content

Calendar: Difference between revisions

23 bytes removed ,  12 years ago
Edit task: Allow output in 132 columns. (The task allowed such output before 12 June 2011.) Remove reference to IBM 1403; the CALENDAR task only requires uppercase code, not uppercase output.
(→‎{{header|Ruby}}: Use `tput co` to avoid escape sequences from curses. Copy the output in 132 columns and describe the output in 80 columns.)
(Edit task: Allow output in 132 columns. (The task allowed such output before 12 June 2011.) Remove reference to IBM 1403; the CALENDAR task only requires uppercase code, not uppercase output.)
Line 1:
{{task|Date and time}}
Create a routine that will generate ana text calendar for any dateyear. Test the calendar by generating a calendar for the year 1969, on a [[wp:IBM_3270#Displays|IBMdevice 3278of modelthe 4time. terminal]]Choose (80×43 display with accented characters)one of the time. following devices:
 
* A line printer with a width of 132 characters.
As* aAn test[[wp:IBM_3270#Displays|IBM case,3278 targetmodel 4 terminal]] (80×43 display with accented characters). Target formatting the months of the year to fit nicely across the 80 character width pagescreen. Restrict number of lines in test output to 43.
 
(Ideally, the program will generate well -formatted calendars for any page width from 20 characters up.)
 
Kudos (κῦδος) for routines that also correctly transition from Julian to Gregorian calendar in September 1752.
Line 11 ⟶ 12:
THE REAL PROGRAMMER'S NATURAL HABITAT
"Taped to the wall is a line-printer Snoopy calender for the year 1969."
For further Kudos see task [[Calendar - for "real" programmers|CALENDAR]], for printing on a 132 character width [[wp:IBM 1403|IBM 1403]] printer. Wherewhere all code and output is to be in UPPERCASE.
 
For economy of size, do not actually include Snoopy generation in either the code or the output, instead just output a place-holder.
 
=={{header|ALGOL 68}}==
{{works with|ALGOL 68|Revision 1 - no extensions to language used}}
Line 401 ⟶ 403:
 
=={{header|PicoLisp}}==
This "calendar" is nicely formatedformatted, and fits into 20 columns ;-)
{{Template:Needs-review}}
This "calendar" is nicely formated, and fits into 20 columns ;-)
<lang PicoLisp>(de cal (Year)
(prinl "====== " Year " ======")
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.