GibbonEdu / core

Gibbon is a flexible, open source school management platform designed to make life better for teachers, students, parents and leaders.
https://gibbonedu.org
GNU General Public License v3.0
467 stars 303 forks source link

System: update handling of readable dates in Format class #1836

Closed SKuipers closed 4 months ago

SKuipers commented 4 months ago

This PR builds on @yookoala's excellent work by making some additional changes to improve backwards compatibility while aiming to keep the code maintainable.

Motivation and Context Moving the implementation of date patterns/formats internally and using an enumerated constant should make the code more readable and maintainable long-term. Anything using a date class will no longer rely on concrete date patterns, enabling the Format class to handle the patterns internally, and apply fallbacks as necessary.

How Has This Been Tested? Locally