diff --git a/dist/helpers/generic-helpers.js b/dist/helpers/generic-helpers.js index 6d65c56..a9da25e 100644 --- a/dist/helpers/generic-helpers.js +++ b/dist/helpers/generic-helpers.js @@ -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; diff --git a/src/helpers/generic-helpers.coffee b/src/helpers/generic-helpers.coffee index 242c4fc..dddef4d 100644 --- a/src/helpers/generic-helpers.coffee +++ b/src/helpers/generic-helpers.coffee @@ -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