this post was submitted on 12 Nov 2025
95 points (100.0% liked)

Programming

23459 readers
33 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

While looking around for datepicker libraries, I came across this helpful guide on how you can use native datepickers for most, if not all, required datepicker functionality. Sure, it may not be as flashy as the JS enhanced or framework alternatives, but still worth considering IMO.

you are viewing a single comment's thread
view the rest of the comments
[–] Kissaki@programming.dev 3 points 1 day ago* (last edited 1 day ago)

On AniDB I can enter dd.MM.yyyy or yyyy-MM-dd (text input), which I like a lot. I often prefer reading and writing yyyy-MM-dd.

Some time ago I changed my Windows number format settings to show me yyyy-MM-dd formats. Unfortunately, that broke my webbrowsers date input / datepicker. :( So I had to go back to the standard culture format (de in my case).

The worst is when you work with dates and don't know what is what, or when the behavior is unexpected.

Probably everyone knows about the Excel shitshow of implicitly converted values.

In SQL Server, what do you think 0000-00-00 is when converted to a date, explicitly or implicitly? Well, unfortunately, yyyyMMdd is a safer format than yyyy-MM-dd.

SET LANGUAGE 'us_english'
SELECT CONVERT(date, '2025-12-13')
--SELECT CONVERT(date, '2025-13-12') -- err
SELECT CONVERT(datetime, '2025-12-13 07:00:00')
--SELECT CONVERT(datetime, '2025-13-12 07:00:00') -- err

SET LANGUAGE 'Deutsch'
SELECT CONVERT(date, '2025-12-13')
--SELECT CONVERT(date, '2025-13-12') --err
--SELECT CONVERT(datetime, '2025-12-13 07:00:00') --err !!
SELECT CONVERT(datetime, '2025-13-12 07:00:00')

No, yyyy-dd-MM is not a common or valid German date format. That's usually dd.MM.yyyy.

But worst of all, it changes behavior of the date parsing between date only and date + time types.