mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-21 16:00:11 +00:00
When date ranges are identical, only show one.
This commit is contained in:
parent
3cf850ea0e
commit
d31f6caf50
4
dist/helpers/generic-helpers.js
vendored
4
dist/helpers/generic-helpers.js
vendored
@ -589,7 +589,9 @@ Generic template helper definitions for HackMyResume / FluentCV.
|
||||
dateTemp = FluentDate.fmt(dateB);
|
||||
dateTo = dateTemp.format(fmt);
|
||||
}
|
||||
if (dateFrom && dateTo) {
|
||||
if (dateFrom === dateTo) {
|
||||
return dateFrom;
|
||||
} else if (dateFrom && dateTo) {
|
||||
return dateFrom + sep + dateTo;
|
||||
} else if (dateFrom || dateTo) {
|
||||
return dateFrom || dateTo;
|
||||
|
@ -551,7 +551,10 @@ _fromTo = ( dateA, dateB, fmt, sep, fallback ) ->
|
||||
dateTemp = FluentDate.fmt( dateB )
|
||||
dateTo = dateTemp.format( fmt )
|
||||
|
||||
if dateFrom && dateTo
|
||||
|
||||
if dateFrom == dateTo
|
||||
return dateFrom
|
||||
else if dateFrom && dateTo
|
||||
return dateFrom + sep + dateTo
|
||||
else if dateFrom || dateTo
|
||||
return dateFrom || dateTo
|
||||
|
Loading…
Reference in New Issue
Block a user