Ok so Date formats are terrible....

Post #159 written by Khodok in Friction Log

Content

Date Formats

Disclaimer
To all Americans (because you have weird date formats) or actually any other countries with weird date formats (base ones of course, “big formats”/ modified ones are often better), and even to me, Khodok, don’t worry, I’ll fix how dates are shown on the website, but that’s not what I’ll talk about today…

Point of this post

I just added “Future Posts”, post that are marked as published but where the date is actually greater than the current one, making them release in the future, that’s great, except when you use a package that wasn’t updated for a while but that still works well except for one thing: the dates are shown in Idk-where format while chosen (MM/DD/YYYY, while we use DD/MM/YYYY here), and when we click “ok, I like this edit, I’ll save it” well guess what… it gets stored as DD/MM/YYYY… so if you choose something a bit like this: 11/28/2020 (that would be the 28th November 2020), well it actually stores it (or tries to, I’ll get to it) as 11th whatever the 28th month could be 2020… which of course doesn’t work… except the plugin isn’t done (by default the way I handle my stuff since it’s a one user only thing, I don’t need error messages, trust me, I’ll reconsider lmao), and if by luck you have to use a date where the day is less or equal to 12, the day and the month will also be switched, so 12/03/2020 would be the 12th March 2020, while for this format it’s actually the 3rd of December 2020…

It took me hours to fix this… (mainly because I had to go and tried to fix it while using remote desktop on my phone, but still), it was painful, so it deserves its Friction Log

Comments

Please Log in to leave a comment.

No comments yet.