mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-15 10:07:07 +01:00
Improve conversions and tests.
This commit is contained in:
@ -66,7 +66,10 @@ FluentDate/*.prototype*/.fmt = function( dt ) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
if( dt.isValid && dt.isValid() )
|
||||
if( !dt ) {
|
||||
return moment();
|
||||
}
|
||||
else if( dt.isValid && dt.isValid() )
|
||||
return dt;
|
||||
throw 'Unknown date object encountered.';
|
||||
}
|
||||
|
Reference in New Issue
Block a user