this post was submitted on 29 Jul 2023
1 points (100.0% liked)

Perl

176 readers
1 users here now

founded 1 year ago
MODERATORS
 

Calendar::Simple takes a few parameters and returns an array of array refs representing the weeks and days of the month. That's it! You can use it to display text calendars, or find all of the dates for a particular day of the week for a year, or use with an HTML builder module to create a calendar web page, or whatever you want.

One caveat, which is in the documentation though I missed it, is that weeks start on Monday by default. You need that third param to specify Sunday if you want that.

I also used enum and Text::Reform

Do you have any modules you've found that really get the old brain juices flowing?

july-thru-december.pl

|               July               |
| Mo | Tu | We | Th | Fr | Sa | Su |
|    |    |    |    |    |  1 |  2 |
|  3 |  4 |  5 |  6 |  7 |  8 |  9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |    |    |    |    |    |    |
|              August              |
| Mo | Tu | We | Th | Fr | Sa | Su |
|    |  1 |  2 |  3 |  4 |  5 |  6 |
|  7 |  8 |  9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |    |    |    |
|            September             |
| Mo | Tu | We | Th | Fr | Sa | Su |
|    |    |    |    |  1 |  2 |  3 |
|  4 |  5 |  6 |  7 |  8 |  9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 |    |
|             October              |
| Mo | Tu | We | Th | Fr | Sa | Su |
|    |    |    |    |    |    |  1 |
|  2 |  3 |  4 |  5 |  6 |  7 |  8 |
|  9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 |    |    |    |    |    |
|             November             |
| Mo | Tu | We | Th | Fr | Sa | Su |
|    |    |  1 |  2 |  3 |  4 |  5 |
|  6 |  7 |  8 |  9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 |    |    |    |
|             December             |
| Mo | Tu | We | Th | Fr | Sa | Su |
|    |    |    |    |  1 |  2 |  3 |
|  4 |  5 |  6 |  7 |  8 |  9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |

humpdays.pl

All Wednesday's in 2023
Jan: 4, 11, 18, 25
Feb: 1, 8, 15, 22
Mar: 1, 8, 15, 22, 29
Apr: 5, 12, 19, 26
May: 3, 10, 17, 24, 31
Jun: 7, 14, 21, 28
Jul: 5, 12, 19, 26
Aug: 2, 9, 16, 23, 30
Sep: 6, 13, 20, 27
Oct: 4, 11, 18, 25
Nov: 1, 8, 15, 22, 29
Dec: 6, 13, 20, 27
no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here