1
0
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:
ryneeverett 2017-01-06 22:37:08 -05:00
parent 3cf850ea0e
commit d31f6caf50
2 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -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