mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-12-22 13:37:21 +00:00
Merge pull request #186 from ryneeverett/same-value-dateRange
When date ranges are identical, only show one.
This commit is contained in:
commit
d25f8d0f97
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