Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hole idea: Calendar #908

Open
Steffan153 opened this issue Mar 5, 2023 · 5 comments
Open

Hole idea: Calendar #908

Steffan153 opened this issue Mar 5, 2023 · 5 comments
Labels
hole-idea An idea for a new hole. idea

Comments

@Steffan153
Copy link
Contributor

For each argument in the form MM YYYY, output a calendar for that month.

Example input (if any)

03 2023

Example output

         01 02 03 04
05 06 07 08 09 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Should we drop the year and let them assume it's not leap?

@Steffan153 Steffan153 added hole-idea An idea for a new hole. idea labels Mar 5, 2023
@MichalMarsalek
Copy link
Collaborator

  1. I like the idea.
  2. Iso weeks start with Monday, not Sunday.
  3. What do you mean by "drop the year"? Doesn't the year play a crucial part in the output layout?

@btnlq
Copy link
Contributor

btnlq commented Mar 5, 2023

Output 2016 calendar:

            01 02 03
04 05 06 07 08 09 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

...

         01 02 03 04
05 06 07 08 09 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

or

            01 02 03   01 02 03 04 05 06 07      01 02 03 04 05 06
04 05 06 07 08 09 10   08 09 10 11 12 13 14   07 08 09 10 11 12 13
11 12 13 14 15 16 17   15 16 17 18 19 20 21   14 15 16 17 18 19 20
18 19 20 21 22 23 24   22 23 24 25 26 27 28   21 22 23 24 25 26 27
25 26 27 28 29 30 31   29                     28 29 30 31

            01 02 03                     01         01 02 03 04 05
04 05 06 07 08 09 10   02 03 04 05 06 07 08   06 07 08 09 10 11 12
11 12 13 14 15 16 17   09 10 11 12 13 14 15   13 14 15 16 17 18 19
18 19 20 21 22 23 24   16 17 18 19 20 21 22   20 21 22 23 24 25 26
25 26 27 28 29 30      23 24 25 26 27 28 29   27 28 29 30
                       30 31

            01 02 03   01 02 03 04 05 06 07            01 02 03 04
04 05 06 07 08 09 10   08 09 10 11 12 13 14   05 06 07 08 09 10 11
11 12 13 14 15 16 17   15 16 17 18 19 20 21   12 13 14 15 16 17 18
18 19 20 21 22 23 24   22 23 24 25 26 27 28   19 20 21 22 23 24 25
25 26 27 28 29 30 31   29 30 31               26 27 28 29 30

               01 02      01 02 03 04 05 06            01 02 03 04
03 04 05 06 07 08 09   07 08 09 10 11 12 13   05 06 07 08 09 10 11
10 11 12 13 14 15 16   14 15 16 17 18 19 20   12 13 14 15 16 17 18
17 18 19 20 21 22 23   21 22 23 24 25 26 27   19 20 21 22 23 24 25
24 25 26 27 28 29 30   28 29 30               26 27 28 29 30 31
31

@Steffan153
Copy link
Contributor Author

What do you mean by "drop the year"? Doesn't the year play a crucial part in the output layout?

Sorry, I got mixed up lol. Keep the year, yes, but let them assume that it's not leap.

@Steffan153
Copy link
Contributor Author

Steffan153 commented Mar 5, 2023

That could work too to just print a whole calendar for a whole year. Do you mean a fixed year 2016 or should we still take an argument?

I don't think we need a grid layout though - I think it's complicated enough.

@hallvabo
Copy link

https://docs.python.org/3.12/library/calendar.html#calendar.TextCalendar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hole-idea An idea for a new hole. idea
Projects
None yet
Development

No branches or pull requests

4 participants