Skip to content

Commit

Permalink
Merge pull request #71 from takkii/develop
Browse files Browse the repository at this point in the history
Update.
  • Loading branch information
takkii authored Feb 25, 2024
2 parents ba3f39d + ccde727 commit d39e350
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions unit/timestamp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import datetime
import gc
import re
import threading


Expand All @@ -13,11 +14,14 @@ def main():
st_month = str(datetime.datetime.now().month)
st_day = str(datetime.datetime.now().day)

two_month = bool(re.fullmatch("^[2]$", str(month)))
eleven_month = bool(re.fullmatch("^[11]$", str(month)))

if year % 4 == 0 and year % 100 != 0 or year % 400 == 0:
if month == 2:
if two_month:
calc = ((365 * year + year / 4 - year / 100 + year / 400 +
(306 * (month + 1)) / 10 + day) - 426) % 7
elif month == 11:
elif eleven_month:
calc = ((365 * year + year / 4 - year / 100 + year / 400 +
(306 * (month + 1)) / 10 + day) - 427) % 7
else:
Expand Down

0 comments on commit d39e350

Please sign in to comment.