Commit aa949d7
authored
correct current month value
* When running cal with no arguments the month number is determined from localtime(), which returns 0 for Jan
* Function fmt_month() needs 1 for Jan, so adjust the value passed in
* Patch tested on Linux
* test1: perl cal 0 2025 ---> invalid month
* test2: perl cal ---> now shows current month (5)
* test3: perl cal 5 2025 ---> same output as test21 parent 60b6a3d commit aa949d7
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments