mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-22 16:30:11 +00:00
Fix: formatDate helper references the moment method, not the momentDate object
This commit is contained in:
parent
889bd4bfc5
commit
dd2148bb92
@ -28,10 +28,7 @@ Generic template helper definitions for HackMyResume / FluentCV.
|
|||||||
formatDate: function(datetime, format, fallback) {
|
formatDate: function(datetime, format, fallback) {
|
||||||
if (moment) {
|
if (moment) {
|
||||||
var momentDate = moment( datetime );
|
var momentDate = moment( datetime );
|
||||||
|
if (momentDate.isValid()) return momentDate.format(format);
|
||||||
if (momentDate.isValid()) {
|
|
||||||
return moment.format(format);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return datetime || (typeof fallback == 'string' ? fallback : (fallback === true ? 'Present' : null));
|
return datetime || (typeof fallback == 'string' ? fallback : (fallback === true ? 'Present' : null));
|
||||||
|
Loading…
Reference in New Issue
Block a user