File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 8888 s : ( ) => s ( ) ,
8989 ss : ( ) => pad ( s ( ) ) ,
9090 l : ( ) => pad ( L ( ) , 3 ) ,
91- L : ( ) => pad ( Math . round ( L ( ) / 10 ) ) ,
91+ L : ( ) => pad ( Math . floor ( L ( ) / 10 ) ) ,
9292 t : ( ) =>
9393 H ( ) < 12
9494 ? dateFormat . i18n . timeNames [ 0 ]
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ describe("Mask: 'L'", function () {
55 it ( "should format '2020-10-10T08:48:02.436' as '44'" , function ( done ) {
66 var date = new Date ( "2020-10-10T08:48:02.436" ) ;
77 var d = dateFormat ( date , "L" ) ;
8- assert . strictEqual ( d , "44 " ) ;
8+ assert . strictEqual ( d , "43 " ) ;
99 done ( ) ;
1010 } ) ;
1111
@@ -24,7 +24,13 @@ describe("Mask: 'L'", function () {
2424
2525 it ( "should format '2002-12-25T19:35:55.655' as '66'" , function ( done ) {
2626 var d = dateFormat ( "2002-12-25T19:35:55.655" , "L" ) ;
27- assert . strictEqual ( d , "66" ) ;
27+ assert . strictEqual ( d , "65" ) ;
28+ done ( ) ;
29+ } ) ;
30+
31+ it ( "should format '2126-07-23T03:15:25.999' as '99'" , function ( done ) {
32+ var d = dateFormat ( "2126-07-23T03:15:25.999" , "L" ) ;
33+ assert . strictEqual ( d , "99" ) ;
2834 done ( ) ;
2935 } ) ;
3036} ) ;
You can’t perform that action at this time.
0 commit comments