[PLAT-3015] Simplify some date-time code
[PLAT-3015] Avoid quarter-year bug