89
Lelouch
125d

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

Comments
  • 13
    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
  • 9
    @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?
  • 3
    MM/DD/YYYY (for mericans), or
    YYYY/DD/MM (jk no one use this)

    😈
  • 8
    I've seen DD.MM.YYYY in German XML formats, but yeah just use ISO dates.
    The American way is just illogical to me (going from middle to smallest to biggest unit).
  • 6
    Just use iso8601 (yyyy-mm-dd)
  • 4
    *Inner me:But it's a meme right :0

    The world: wtf! Just stick to ISO!
  • 9
    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.
  • 5
    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.
  • 5
    Everyone is wrong. :-)

    Its:

    DDD-DD-MMM-YYYY

    Eg. SAT-10-AUG-2019

    Otherwise if its just:

    10-08-2019

    Is it the 10th of August, or the 8th of October ?
  • 3
    Guess I’m gonna die single then 🤷‍♂️
  • 1
    I am with you.
  • 2
    @Sumafu oh. that is really confusing.
  • 2
    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.
  • 0
    I know folk say to put the year first, so file sorting is correct.

    But why doesn't someone just write a file sorter which can handle other date formats correctly !
  • 2
    Guys your all wrong it's dd/yyyy/mm
  • 3
    @iamroot

    But someone might think its mm/yyyy/dd instead..
  • 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
    @Parzi

    Having worked in large scale filing systems, I've seen all manner of standards trip folk up.

    One good example, two buildings, old one building, next to new building.

    Old buildings the filing cabinets are labelled:

    A, B, C, D, E, F up to Z.

    New building, they are labelled:

    Z, Y, X, W, V, U up to A..

    Recipe for disaster, all because someone had the blueprints the wrong way round !

    We wasted tens of thousands of work hours dealing with things put in the wrong place.

    Dates was one of those areas that caused issues.

    Also cm and inches..
  • 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