DateFormat bug in utils.dateFormat

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

DateFormat bug in utils.dateFormat

Postby briese-it » Tue Dec 31, 2024 10:32 am

There seems to be a big bug in utils.dateFormat, I have never noticed that before.
The year is wrong for 30.12. and 31.12. :

=>var vDate = new Date()
=>vDate

Tue Dec 31 09:25:26 CET 2024

=>utils.dateFormat(vDate,"YYMMdd");

251231

Same for 30.12.
I already created a ticket.
Michael Harms
Head of Software Development
Briese Schiffahrts GmbH & Co.KG, Germany

- Servoy 2024.9.1.4003
- Servoy 2021.3.0.3642
- Servoy 2020.3.3.3565_LTS
Running on Windows 2019 DataCenter - MSSQL2017 & PostGreSQL
User avatar
briese-it
 
Posts: 186
Joined: Mon Jun 20, 2011 1:50 pm
Location: Leer, Germany

Re: DateFormat bug in utils.dateFormat

Postby paronne » Tue Dec 31, 2024 11:25 am

Hi Micheal,

using the capital YY the year of the week; to get 24 as format you should use yyMMdd instead of YYMMdd.

Have a great new year,
Paolo
paronne
 
Posts: 218
Joined: Fri Nov 02, 2012 3:21 pm

Re: DateFormat bug in utils.dateFormat

Postby briese-it » Tue Dec 31, 2024 11:30 am

Oh man, I actually overlooked that. Thank you.
Thanks, same to you :-)
Michael Harms
Head of Software Development
Briese Schiffahrts GmbH & Co.KG, Germany

- Servoy 2024.9.1.4003
- Servoy 2021.3.0.3642
- Servoy 2020.3.3.3565_LTS
Running on Windows 2019 DataCenter - MSSQL2017 & PostGreSQL
User avatar
briese-it
 
Posts: 186
Joined: Mon Jun 20, 2011 1:50 pm
Location: Leer, Germany


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 4 guests