diff --git a/_includes/pro/resume/work.html b/_includes/pro/resume/work.html index 42cf931..ffdbf68 100644 --- a/_includes/pro/resume/work.html +++ b/_includes/pro/resume/work.html @@ -31,21 +31,24 @@

{% assign todayDate = todayYear | append: '-' | append: todayMonth %} {% if startDate > todayDate %} - not started + Not started {% else %} {% assign yearDiff = endYear | minus: startYear %} {% assign monthDiff = endMonth | minus: startMonth %} + {% assign totalMonths = yearDiff | times: 12 | plus: monthDiff %} - {% if monthDiff < 0 %} - {% assign monthDiff = monthDiff | plus: 12 %} - {% assign yearDiff = yearDiff | minus: 1 %} + {% if totalMonths < 0 %} + {% assign totalMonths = 0 %} {% endif %} - {% assign totalMonths = yearDiff | times: 12 | plus: monthDiff %} - {% assign finalYears = totalMonths | divided_by: 12 %} {% assign finalMonths = totalMonths | modulo: 12 %} + {% if finalMonths == 0 and totalMonths > 0 %} + {% assign finalMonths = 12 %} + {% assign finalYears = finalYears | minus: 1 %} + {% endif %} + {% assign unitYear = "year" %} {% if finalYears != 1 %} {% assign unitYear = "years" %} {% endif %} {% assign unitMonth = "month" %} @@ -57,9 +60,6 @@

{% endif %} - - -