mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-12-23 05:37:23 +00:00
Fix: Allow year-only dates ('YYYY').
This commit is contained in:
parent
b0b2af8278
commit
9de5069c20
@ -40,7 +40,7 @@ FluentDate/*.prototype*/.fmt = function( dt ) {
|
||||
else if( /^\d{4}-\d{1,2}$/.test(dt) ) { // "2015-03", "1998-4"
|
||||
return moment( dt, 'YYYY-MM' );
|
||||
}
|
||||
else if( /^\s\d{4}$/.test(dt) ) { // "2015"
|
||||
else if( /^\s*\d{4}\s*$/.test(dt) ) { // "2015"
|
||||
return moment( dt, 'YYYY' );
|
||||
}
|
||||
else if( /^\s*$/.test(dt) ) { // "", " "
|
||||
|
Loading…
Reference in New Issue
Block a user