1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-22 08:20:11 +00:00

Fix: Allow "current" in addition to "present" and "now".

This commit is contained in:
devlinjd 2015-10-27 21:09:54 -04:00
parent 9de5069c20
commit 1e44ce5e5e

View File

@ -28,7 +28,7 @@ function FluentDate( dt ) {
FluentDate/*.prototype*/.fmt = function( dt ) { FluentDate/*.prototype*/.fmt = function( dt ) {
if( (typeof dt === 'string' || dt instanceof String) ) { if( (typeof dt === 'string' || dt instanceof String) ) {
dt = dt.toLowerCase().trim(); dt = dt.toLowerCase().trim();
if( /^(present|now)$/.test(dt) ) { // "Present", "Now" if( /^(present|now|current)$/.test(dt) ) { // "Present", "Now"
return moment(); return moment();
} }
else if( /^\D+\s+\d{4}$/.test(dt) ) { // "Mar 2015" else if( /^\D+\s+\d{4}$/.test(dt) ) { // "Mar 2015"