80
Lelouch
5y

I believe yyyy-mm-dd is the most preferred one in the service layer level. Anyone with me?

Comments
  • 14
    dd/mm/yyyy -- WTF

    There is an ISO format. Stick to it
  • 4
    @netikras Are you hating on italians? As far as I know that's their format for writing dates
  • 8
    @korrat almost all European countries use it

    Iso dates makes more sense, even in plain text could you easily order those
  • 2
    @korrat where do you see hatrid of someone?
  • 4
    MM/DD/YYYY (for mericans), or
    YYYY/DD/MM (jk no one use this)

    😈
  • 5
    Just use iso8601 (yyyy-mm-dd)
  • 4
    *Inner me:But it's a meme right :0

    The world: wtf! Just stick to ISO!
  • 8
    A programmer should be ashamed of anything other than yyyy-mm-dd. Why? Because it naturally sorts when used as a comparison value.

    I use this in dates in filenames. Its really nice to not have to hunt through files with stupid dates.
  • 2
    @Demolishun That's so cool idea! Thanks man :)
  • 2
    @Demolishun isn't it also more search performant? Like if you have a massive database and need to search on a specific date.
  • 3
    I only like the german format dd.MM.yyyy (btw I’m german) and the iso format yyyy-MM-dd, because this two are clearly. If there is a point, then it’s the german format and if there is a minus it is the iso format. But if there is a slash it could be MM/dd/yyyy or dd/MM/yyyy or yyyy/MM/dd or something completely different.
  • 0
    @Defaltd I would hope databases would be storing dates in a way that makes it faster. I don't know, I don't do big databases much.
  • 2
    Guess I’m gonna die single then 🤷‍♂️
  • 1
    I am with you.
  • 2
    @Sumafu oh. that is really confusing.
  • 1
    I tend to use dd/mm/yyyy for displaying the date, but in personal projects I've used yyyy-mm-dd for file names. Sometimes I've been really pedantic and used yyyy-mm-dd-h-m-s just because I can.
  • 3
    For labeling file I usually use YYYY-MM-DD as prefix so it sorts after the dates I've given it everywhere.
    I sometimes also just use YYYYMMDD (also used by your smartphone camera).

    In some rare cases I also use DDMMYYYY or DD.MM.YY(YY) as suffix for backups that I'll probably never use again anyways.
  • 0
    @korrat same for Brazil and probably many countries around it.
  • 2
    Guys your all wrong it's dd/yyyy/mm
  • 1
    Imo its best to use yyyy-mm-dd because it automatically groups and sorts from Highest priority to lowest. For example if you want to dump logs or files named by date, doing mm-dd-yyyy would sort your files by months, then by days, and lastly by years, which makes no sense to see the january of 2018 next to january of 2019 if you're browsing it...
    Same for sorting in the database if for some reason you need to work with dates in string format...
  • 1
    As an American, M/D/Y feels right, as this is how it's written longhand, ex:
    August 18, 2019
    8/18/2019

    however the ISO standard doesn't trip anyone up that I've seen (as long as you're using 4-digit years) so it's a good fit.
  • 1
    I'd go with ymydymyd
  • 0
    I prefer dd/mm/yyyy since it arranges the number by importance, you usually know year and month it is, day is the most important number
  • 0
    yyyy-mm-dd
Add Comment