File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,15 @@ datetimeTest = describe "Data.Formatter.DateTime" do
5151 )
5252
5353 describe " hour 24" do
54+ it " 24 hour and more then 0 time component" $ do
55+ let err = (Left " When hour is 24, other time component must be 0@1:24" )
56+ shouldEqual (FDT .unformatDateTime " YYYY-DD-MM HH:mm:ss:SSS" " 0000-01-01 24:00:00:001" ) err
57+ shouldEqual (FDT .unformatDateTime " YYYY-DD-MM HH:mm:ss:SSS" " 0000-01-01 24:00:01:000" ) err
58+ shouldEqual (FDT .unformatDateTime " YYYY-DD-MM HH:mm:ss:SSS" " 0000-01-01 24:01:00:000" ) err
59+
5460 it " +1" $ shouldEqual
55- (FDT .unformatDateTime " YYYY-DD-MM HH:mm:ss" " 0000-01-01 24:59:59 " )
56- (Right $ makeDateTime 0 1 2 0 59 59 0 )
61+ (FDT .unformatDateTime " YYYY-DD-MM HH:mm:ss:SSS " " 0000-01-01 24:00:00:000 " )
62+ (Right $ makeDateTime 0 1 2 0 0 0 0 )
5763
5864 describe " hour {0,12} {am,pm}" do
5965 let format = " hh a"
You can’t perform that action at this time.
0 commit comments