collectiveaccess / providence

Cataloguing and data/media management application
GNU General Public License v3.0
290 stars 166 forks source link

TimeExpressionParser doesn't take into account southern hemisphere #1491

Open Monica-Wood opened 10 months ago

Monica-Wood commented 10 months ago

If you have the locale en_AU and enter 'summer 2019' the dates are set June - Sept

These values are hardcoded in TimeExpressionParser.php.

Need a way to have a configuration option in datetime.conf or added to the en_AU.lang under TimeExpressionParser, where the seasons can be defined.

Monica-Wood commented 10 months ago

FYI. I took the en_AU.lang file and filled it out as such

# Seasons
winterSeason = [summer]
springSeason = [autumn, fall]
summerSeason = [winter]
autumnSeason = [spring]

which is a bit of a hack and doesn't cover the fact that Australians are crazy and start their seasons on the 1st of the month Summer = 1st Dec - 28/29 Feb Autumn = 1 March - 31 May Winter = 1 June - 31 August Spring = 1 Sept - 30 Nov

collectiveaccess commented 10 months ago

If you want changes to the AU date/time config and/or season parsing please create a pull request for it.