Hacker News new | past | comments | ask | show | jobs | submit login

I worked in Germany for two years and they use dots: 2021.11.13. I really like this and quickly adopted this syntax myself.

(I guess they do it the other way around though: 13.11.2021.)




Somes tools will parse it as a file extension


>13.11.2021

This is not only the German but most European way of writing date.


I don't think this is true, Italy uses generally slashes d/m/y or dashes d-m-y. France and Spain use slashes d/m/y. The Netherlands appear to use dashes: d-m-y. Hungary uses dots, but they use the y.m.d order. Sweden uses y-m-d.

You can play with this in JS :)

    const event = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));
    const options = { weekday: 'long', year: 'numeric', month: 'numeric', day: 'numeric' };
    console.log(event.toLocaleDateString('de-DE', options));
    console.log(event.toLocaleDateString('it-IT', options));
    console.log(event.toLocaleDateString('fr-FR', options));
    console.log(event.toLocaleDateString('hu-HU', options));
    console.log(event.toLocaleDateString('sv-SE', options));
    console.log(event.toLocaleDateString('es-ES', options));
    console.log(event.toLocaleDateString('nl-NL', options));




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: