Fucking leap years2

main
Terence Eden 2024-02-29 09:17:00 +00:00
rodzic 2fd688da74
commit fd0c309f7f
1 zmienionych plików z 16 dodań i 12 usunięć

Wyświetl plik

@ -27,6 +27,7 @@ while (year_counter >= year_joined ) :
year_counter -= 1
# The end of today is the start of tomorrow
# This means yesterday can take into account leap-years
try:
today_end = datetime(year_counter, month_now, day_now, 00, 00) + timedelta(days=1)
yesterday_end = today_end - timedelta(days=1)
# Bitwise shift the integer representation and convert to milliseconds
@ -39,3 +40,6 @@ while (year_counter >= year_joined ) :
# Print the date and URl
for status in all_statuses :
print( str(status["created_at"])[:16] + " " + BeautifulSoup(status["content"], features="html.parser").get_text() + " - " + status["uri"] + "\n")
except:
print( str(year_counter) + " is not a leap year.")