Files
basic-computer-games/21_Calendar
Guido Knips 7a62098e94 Un-ignore Cargo.lock
Official cargo documentation says Cargo.lock should be
under version control for binaries (but not for libraries)

see https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries
2023-08-28 21:06:35 +02:00
..
2022-03-05 09:29:23 +01:00
2022-03-05 09:29:23 +01:00
2022-01-11 21:19:47 -05:00
2022-04-02 08:10:01 +02:00
2022-03-21 10:12:03 +08:00
2023-08-28 21:06:35 +02:00

Calendar

This program prints out a calendar for any year. You must specify the starting day of the week of the year:

  • 0: Sunday
  • -1: Monday
  • -2: Tuesday
  • -3: Wednesday
  • -4: Thursday
  • -5: Friday
  • -6: Saturday

You can determine this by using the program WEEKDAY. You must also make two changes for leap years. The program listing describes the necessary changes. Running the program produces a nice 12-month calendar.

The program was written by Geoffrey Chase of the Abbey, Portsmouth, Rhode Island.


As published in Basic Computer Games (1978):

Downloaded from Vintage Basic at http://www.vintage-basic.net/games.html

Porting Notes

  • While many modern environments have time/date functions that would make this program both easier and more automatic, in these ports we are choosing to do without them, as in the original program.

  • Some ports choose to ask the user the starting day of week, and whether it's a leap year, rather than force changes to the code to fit the desired year.