# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
#Calculate a life
import datetime

date_a = datetime.date(2018,1,1)
date_b = datetime.date(2019,1,1)
# -

days_2019 = date_b - date_a
print(days_2019)

print(date_a)

print(type(date_a))

print(type(days_2019))

#daysはtimedelta型が持っている関数
#あるデータ型に属している専用関数のことをデータ属性、または属性（アトリビュート）と呼ぶ
days_2019.days

today = datetime.date.today()
print(today)

mybirthday = datetime.date(2000,1,1)
print(mybirthday)

lifetime = today - mybirthday
print(lifetime.days)

StarcoderdataJupyterScriptsDedupFiltered