728x90
from datetime import date
from dateutil.relativedelta import relativedelta
today = date.today()
print(today)
sub_date = today - relativedelta(years=2)
print(sub_date)
728x90
'programming language > Python' 카테고리의 다른 글
[Python] Aho-corasick 알고리즘 (0) | 2023.03.16 |
---|---|
[Python] 문자열 알고리즘 - Trie (0) | 2023.03.15 |
[Python] Colab Selenium - 코랩 셀리니움 사용법 (0) | 2020.11.26 |
[Python] 파이썬 넘파이 (Numpy) - numpy.log1p() / numpy.expm1() (0) | 2020.10.22 |
[Python] 넘파이 (Numpy) - 공부하기_Numpy.c_ .2 (0) | 2020.10.20 |