File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ from datetime import date , timedelta
2
+
3
+ start_100days = date (2017 , 3 , 30 )
4
+ pybites_founded = date (2016 , 12 , 19 )
5
+ pycon_date = date (2018 , 5 , 8 )
6
+
7
+
8
+ def get_hundred_days_end_date ():
9
+ """Return a string of yyyy-mm-dd"""
10
+ end_date = start_100days + timedelta (days = 100 )
11
+ return str (end_date )
12
+
13
+
14
+ def get_days_between_pb_start_first_joint_pycon ():
15
+ """Return the int number of days"""
16
+ between = pycon_date - pybites_founded
17
+ return int (between .days )
18
+
19
+ print (get_hundred_days_end_date ())
20
+ print (get_days_between_pb_start_first_joint_pycon ())
Original file line number Diff line number Diff line change
1
+ from calc_dts import (get_hundred_days_end_date ,
2
+ get_days_between_pb_start_first_joint_pycon )
3
+
4
+
5
+ def test_get_hundred_days_end_date ():
6
+ assert get_hundred_days_end_date () == '2017-07-08'
7
+
8
+
9
+ def test_get_days_till_pycon_meetup ():
10
+ assert get_days_between_pb_start_first_joint_pycon () == 505
You can’t perform that action at this time.
0 commit comments