Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
nightowl6986yYYYY-MM-DD for human consumption
Seconds since UNIX epoch (divided by number of seconds in a day) for computer consumption -
@bugreport @nightowl @njpugh90 YYYY-MM-DD for serialization (URL encoded, etc.), MM/DD/YYYY for America or DD/MM/YYYY for other countries in UI.
-
DD mmm YYYY is imo the best and least confusing if you want it to be human readable across the globe. Like 25 sep 2018. In other formats you could accidentally switch the day and month (like 9-11 often gets confused with 9 november)
-
eeee31226yWho on earth uses dots or slashes? (Ze Germans are co-meeng!)
Periods mean end of sentence, abbreviations or appear in a number. Slashes are division or mean 'or'.
Either DD-MM-YYYY for mental sanity.
Or YYYY-MM-DD for sorting sanity.
For brevity the dashes are optional. And no, a dash (-) is not the minus sign (–).
Time can be added too:
YYYYMMDDHHMMSS (you know, with the superior 24 hour clock) or easier to read hh:mm:ss DD-MM-YYYY. -
devios157016yThere is no acceptable ordering other than year-month-day. I don’t really care what separators you use as long as they are in the proper order.
Most-significant to least-significant is how numbers work. -
madumlao4706yYYYY-MM-DD is objectively the best format
It is human-readable
It makes internal sense (decreasing significance)
It is visually sortable
There is no placement ambiguity
- the year being first dictates descending order
- it does not overlap with written date forms (which use slashes)
It is meaningful / unambiguous when truncated
It extends into HH:mm:ss
It is easily computer-generated / parseable
It is forward portable for additional months and dates -
@madumlao Agreed, but your point about truncation doesn't stand. For normal humans, if you talk about a date and you truncate it, you generally want to keep the least significant bit. Everybody knows we are probably talking about the current year.
-
mt3o19136y@RedPolygon if we turncate even further, we end up with just the day, or even day of the week. And this means that even X occurs each week, not some year in the past. TL;DR you're wrong.
-
@mt3o Wait, you mean removing the start of the date? I thought truncating was removing the end of something
Related Rants
A perfect date for a Programmer !!
joke/meme
joke