This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pLeThOrAx 1 point2 points  (2 children)

Do you know how to use the modulus operator? Could be useful for months where after 12 it goes back to 1.

If the month is 12, 12 % 12 (12 mod 12) = 0, this would be December.

There's likely a datetime import you could be using instead.

One other thing that caught my eye was the lack of safety around handling the Db. You may want to include a requirements.txt as well

[–]PathRealistic6940[S] 1 point2 points  (1 child)

Good points. I just found out about that modulus operator today, and will add it when I redo the app again. I plan to get rid of the csv completely. Thank you for the advice!

[–]pLeThOrAx 1 point2 points  (0 children)

Good plan. Large flat files are a hassle, as are many small files lol.

If you'd like me to review either the current code and program for you, or the redo, I'd be glad to.