Bug with dates and toString function?

Bug with dates and toString function?

I'm having a strange bug with my app that happens specifically when applying the toString function to the dates December 30, 2018 or December 31, 2018 the year is changed to 2019. It happens only with those two dates, any other date works fine, anyone else having this problem?

It's breaking my app's functionality for today and tomorrow. 

Try this on any form OnLoad:

alert now.toString("YYYY-MM-dd");

I'm getting today's date but with 2019 as year.