File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ def testParse(self):
64
64
self .assertEqual (dm ('/M' , roundDown = False ).format (iso8601 ), arrow .utcnow ().ceil ('month' ).format (iso8601 ))
65
65
self .assertEqual (dm ('/Y' , roundDown = False ).format (iso8601 ), arrow .utcnow ().ceil ('year' ).format (iso8601 ))
66
66
self .assertEqual (dm ('/y' , roundDown = False ).format (iso8601 ), arrow .utcnow ().ceil ('year' ).format (iso8601 ))
67
+
68
+
69
+ # roundDown option tests
70
+ self .assertEqual (dm ('2016-01-01T14:00:00||/d' ).format (iso8601 ), '2016-01-01T00:00:00-00:00' )
71
+ self .assertEqual (dm ('2016-01-01T14:00:00||/d' , roundDown = False ).format (iso8601 ), '2016-01-01T23:59:59-00:00' )
72
+
67
73
# complicated date math
68
74
self .assertEqual (dm ('now/d-1h' ).format (iso8601 ), arrow .utcnow ().floor ('day' ).replace (hours = - 1 ).format (iso8601 ))
69
75
self .assertEqual (dm ('+1h' ).format (iso8601 ), arrow .utcnow ().replace (hours = + 1 ).format (iso8601 ))
You can’t perform that action at this time.
0 commit comments