> On Mar 4, 2019, at 15:28, john fabiani <[email protected]> wrote:
>
> I knew there was a simple why to get it done! But where is it off my a day?
>
comparing
$ cal
March 2019
Su Mo Tu We Th Fr Sa
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
to
import calendar as cal
cal.monthcalendar(2019,3)
[[0, 0, 0, 0, 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]]
I see the first element of the array is
[0, 0, 0, 0, 1, 2, 3]
where I would have expected
[0, 0, 0, 0, 0, 1, 2]
Which I’m sure is just a question of “defining the start of the week” properly,
but if you just took it as-is, Mar 1 would be Thursday, not Friday if you
translated literally.
—
David Rock
[email protected]
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor