<jupyter_start><jupyter_text><jupyter_code>import datetime
# https://www.youtube.com/watch?v=eirjjyP2qcQ
d = datetime.date(2021,10,28)
print(d)
today = datetime.date.today()
print(today.year)
print(today.day)
print(today.isoweekday())
# TIME DELTAS
# useful for doing operations on dates and times
#time delta 7 days from now 
tdelta = datetime.timedelta(days=7)
print(today + tdelta)
# PRINT WHAT THE DATE WAS A WEEK AGO
print(today - tdelta)
# date2 = date1 + timedelta
# tdelta = date1 + date2

# how many days till my birthday
bday = datetime.date(2022, 4, 3)
till_bday = bday - today
print(till_bday)
# how many days since my birthday
bday = datetime.date(2021, 4, 3)
till_bday = bday - today
print(till_bday)
# how many seconds til my birthday
print(till_bday.total_seconds())<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11330049261083744, 'fraction_numerical': 0.0332512315270936, 'mean_word_length': 5.4523809523809526, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '70675', 'license': 'Unlicense', 'n_tokens_mistral': 334, 'n_tokens_neox': 306, 'n_words': 82, 'path': 'Date_&_Time_1_(birthday).ipynb', 'repo_name': 'Shakestick/HelloWorld', 'size': '812'}