1
0
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:
devlinjd
2015-12-12 10:48:26 -05:00
parent fe2247329e
commit b38a7c1da2
8 changed files with 300 additions and 33 deletions

View File

@ -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.';
}