I used to a script on GAS. Because I do manage attendance by Chat and Google spread sheet with GAS. Chat tool is Chat work. It works on Gas(Rhino). But It doesn\'t work V8.
Google apps script switched runtime engines from Rhino to V8. This caught me by surprise too and borked a bunch of my code, including date and year manipulation.
Years are handled differently. getYear() no longer works as expected.
You can switch back to the old Rhino. See Enabling the Rhino Runtime
There is info about V8 available at https://developers.google.com/apps-script/guides/v8-runtime
Google has published a list of incompatibilities and other differences which contains good documentation about work arounds.
Full link for script migration: https://developers.google.com/apps-script/guides/v8-runtime/migration
Fortunately it's not the drama I was expecting. It would have been nice to have been given a heads up beforehand though.