swift
swift copied to clipboard
Tweaks to Gigasecond Exercise
During my experience reviewing Gigasecond exercise, I often notice how hard it's to work with custom date formats, time zones, and calendars.
I suggest to:
- Make input dates compatible with
ISO8601DateFormatter
.- They are 'Z' postfix away from property confirming to ISO8601 anyway
- That will remove the necessity of dealing with custom time formats and nurture best practices of dealing with time formats (use existing formats)
- Explicitly mention
ISO8601DateFormatter
and the necessity of setting its.timeZone
in the exercise's notes