SpearDates contains date convience routies reducing common that can be repeated in a projects.
In order to get the Month, Day and Year of a date we need to
- Create the flags for Month/Day/Year
- Get those components from a calendar
- Extract each element, checking for nil
This code can be simplifed to
let currentYear = Date().toMondthDayYear().year