I'm trying to printout the month and year from a simple string provided by an API. Thus far it has been correct but for Jan 1st 2022 it prints 2021. I'm running this in New Zealand, where it is currently GMT+12, but will be +13 on every Jan 1st
As seen in the sample below it gets it right in 2020 and 2023, but not 2021 and 2022
Input
{{ '2020-01-01' | date : 'full' }} | {{ '2020-01-01' | date : 'MMM YYYY'}}
{{ '2021-01-01' | date : 'full' }} | {{ '2021-01-01' | date : 'MMM YYYY'}}
{{ '2022-01-01' | date : 'full' }} | {{ '2022-01-01' | date : 'MMM YYYY'}}
{{ '2023-01-01' | date : 'full' }} | {{ '2023-01-01' | date : 'MMM YYYY'}}
Output
Wednesday, January 1, 2020 at 12:00:00 AM GMT+13:00 Jan 2020
Friday, January 1, 2021 at 12:00:00 AM GMT+13:00 Jan 2020
Saturday, January 1, 2022 at 12:00:00 AM GMT+13:00 Jan 2021
Sunday, January 1, 2023 at 12:00:00 AM GMT+13:00 Jan 2023