Skip to content

Instantly share code, notes, and snippets.

/nix/store/x0g3y4xxc00w0a1ykbgmwzw1q0br5vp9-commons-io-2.8.0
└── share
└── java
├── commons-io-2.8.0.jar
├── commons-io-2.8.0-javadoc.jar
├── commons-io-2.8.0-sources.jar
├── commons-io-2.8.0-tests.jar
└── commons-io-2.8.0-test-sources.jar
2 directories, 5 files
@Elijah-trillionz
Elijah-trillionz / exercises.py
Created November 5, 2021 09:46
calculate number of days between two dates
# Write a Python program to calculate number of days between two dates.
# (2014, 7, 2), (2014, 7, 11)
import datetime as date
def num_of_days(date_one, date_two):
try:
(year, month, day) = date_one
new_date = date.datetime(year, month, day).timestamp()