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
-
ISO format is the only real format: YYYY-MM-DD.
You can sort ISO format as strings and it just works! -
If the transfer format serializes dates to strings (e.g. JSON) string probably is the only valid type for a date.
The alternative would be integer when storing the unix timestamp. -
arcioneo7705yHold on, are you telling me people still uses Date, Time, String or any kind to express a date which is not a fucking LONG number!!!????
Jesus freaking Christ, what are you? animals? -
C0D4669025y@arcioneo so you haven't dealt with 1969 before?
DateTime is generally a string
YYYY-MM-DD HH:MM:SS
OR
YYYY-MM-DDTHH:MM:SSZ
Unless it's Unix time stamp (int)
But then you may end up with the 1969 issue of hitting a negative value.
The format can change but it's usually the same.
Related Rants
An Italian provider in his webservice documentation defines a date (birthDate) as string. Why ?
I discovered the format provided is d-m-Y, my database store it as Y-m-d and my users prefer d/m/Y (as many Italians).
rant
web service
date