Dates are hard, episode INT(RND()*256)
-
Earlier today, for want of anything better to do, I was watching a BBC show called Rip Off Britain, which despite its title seems to be a consumer complaints programme rather than a show that exposes scammers etc. Anyway, it had a piece about a British woman who was refused an ESTA (a short-term visa for residents of “friendly countries”) because, the USA claimed, she had overstayed her welcome the year before. She, however, maintained she had left the country about two weeks after arriving, well within the three-month limit.
Eventually, it turned out that the computer systems of the American agency that handles these things had apparently been replaced not long before, and she had left the country on 11 August — which got interpreted as 8 November …
-
@Gurth That'll teach her.
-
See. This is why the US doesn't use British date formats. When we try, stuff like this happens
-
This never would have happened if she'd left two days later, in Undecimber.
-
@slapout1 said in Dates are hard, episode INT(RND()*256):
British date formats
you mean, the formats everyone else uses
-
@fbmac Why are you guys so stubborn about date formats?
-
@boomzilla Dates aren't the worse, south here we have lots of problems with currency values, because it's common for software to use the american number format, with a decimal dot, but sometimes something will use our system, were it's a comma.
-
-
@error said in Dates are hard, episode INT(RND()*256):
I'm getting sick of bringing out all these Rosie O'Donnell pictures:
Personally I prefer 17 JUN 2016. 0 ambiguity there...
-
@sloosecannon said in Dates are hard, episode INT(RND()*256):
@error said in Dates are hard, episode INT(RND()*256):
I'm getting sick of bringing out all these Rosie O'Donnell pictures:
Personally I prefer 17 JUN 2016. 0 ambiguity there...
ISO dates also sort the same ASCIIbetically as chronologically, so that's nice too.
Filed under: And you don't need to localize the month names.
-
@error You're sure you don't prefer RFC2550 date representation?
-
@sloosecannon said in Dates are hard, episode INT(RND()*256):
Personally I prefer 17 JUN 2016. 0 ambiguity there...
Assuming all languages are english-based...
-
@dcon That particular one also works in some others (Dutch and German, no idea about any others without doing research).
-
@Gurth said in Dates are hard, episode INT(RND()*256):
no idea about any others without doing research
I couldn't be bothered with that either.
-
@dcon It’s overrated anyway. Better to just assume stuff, then blame others for being wrong when they disagree.
-
Typical for US Government work. Even if they installed this on August 1, they definitely noticed the code was broken on August 13. (What's that 13th month again?)
But go back and fix the broken data? Fuck no! It's just foreigners, who cares about them?
-
@BatConley said in Dates are hard, episode INT(RND()*256):
(What's that 13th month again?)
Undecimber. From the Latin word for eleven.
-
@PleegWat said in Dates are hard, episode INT(RND()*256):
@BatConley said in Dates are hard, episode INT(RND()*256):
(What's that 13th month again?)
Undecimber. From the Latin word for eleven.
Thank you, Mr. Literal. My point was: the US calendar doesn't have that month.
-
@BatConley said in Dates are hard, episode INT(RND()*256):
My point was: the US calendar doesn't have that month.
It's usually called “January”.
-
@dkf Well you have to carry the year first
-
@sloosecannon We should write dates like we write normal numbers
When the days place overruns, you carry the month.
It's intuitive.Also, elgiu dates. They're terrible.
-
@sloosecannon said in Dates are hard, episode INT(RND()*256):
When the days place overruns, you carry the month.
Will you be at work on 0677?
-
@Yamikuronue said in Dates are hard, episode INT(RND()*256):
@sloosecannon said in Dates are hard, episode INT(RND()*256):
When the days place overruns, you carry the month.
Will you be at work on 0677?
If you check raw, nodebb failed my post :)
-
This post is deleted!
-
@blakeyrat said in Dates are hard, episode INT(RND()*256):
@Gurth That'll teach her.
goddamn foreigners, illegal aliens.
-
This post is deleted!
-
@BatConley said in Dates are hard, episode INT(RND()*256):
Even if they installed this on August 1, they definitely noticed the code was broken on August 13.
The story has me wondering where the actual problem lay, though. Clearly, it could be that part of the software stored dates as DD-MM-YYYY while another read them as MM-DD-YYYY, but it could also be a UI issue: what if dates are entered into text fields for day, month, and year, but some Americans out of habit typed the month into the first field and the day into the second?
The TV show did say the problem was apparently fixed within a few days, and the woman in question had the bad luck of having travelled in the window that it wasn’t. Still, once found, the full fix would have been to
go back and fix the broken data
as well.
-
@Gurth But they still would have found out when they typed in 08-13-20xx and the software upchucked.
So you find out you've entered dates wrong for two weeks: why wouldn't you arrange to fix the dates that were entered wrong? Because you just fucking don't care, that's why.
-
@BatConley I’m not arguing about that :) Just wondering what the actual cause of the problem was, though I suspect we’ll never know.
-
Booking a place to stay for a few days in the mountains and found this description of the different prices at different times of the year:
Summer: 15.6. - 09,15
Winter: 1.12 - 15,03
Off-season: 16.3. - 6.14, 9.16 - 11.30.Is this normal in Slovakia or is this someone's personal system?
-
@PleegWat said in Dates are hard, episode INT(RND()*256):
@error You're sure you don't prefer RFC2550 date representation?
RFC2550 handles dates infinitely far into the past and future. It's fantastic.
-
@coldandtired said in Dates are hard, episode INT(RND()*256):
Is this normal in Slovakia or is this someone's personal system?
Mixing day-month and month-day formats in a single document — a single line, FFS — is . That can't be normal anywhere.
-
@coldandtired said in Dates are hard, episode INT(RND()*256):
Summer: 15.6. - 09,15
Winter: 1.12 - 15,03
Off-season: 16.3. - 6.14, 9.16 - 11.30.I can't even...
Summer is $15 from June until September 15th? With winter being $1 from december until---
Summer is June 15th until September, and $15? Winter is January 12th until---
Summer is June 15 until September, fifteenth? But why the comma? why the comma?!
Winter is January 12 until-- Winter is december 1 until MArch fifteenth? But that makes Summer--Okay, so on line one you read outside- in: fifteenth of june until fifteenth of september.
Line two you read inside out: twelth of january until fifteetnth of march
Line three you read... inside out, march 16 until june 14, and sixteenth of september until 11th of--Godddammit!
-
@Yamikuronue I think the second line means winter starts on the 1st of December.
As a bonus, I copied the above from the Polish version but changing the language also changes the date formats.
In Slovakian (I presume the original language) the dates are all d.M. In English it's as in my previous posts but with the commas replaced by full stops.
-
@coldandtired My tester brain wonders what the rate is on december 1? Winter or Off Season?
-
@Yamikuronue Whichever is more expensive :)
-
@dkf
obligatory javascript dates sheananigansd = new Date(2015,12,01,00,00,00,00) Fri Jan 01 2016 00:00:00 GMT-0300 (ART) d = new Date(2015,13,01,00,00,00,00) Mon Feb 01 2016 00:00:00 GMT-0300 (ART) d = new Date(2015,11,01,00,00,00,00) Tue Dec 01 2015 00:00:00 GMT-0300 (ART)
-
@Jarry Might wanna read the docs.
For some reason, the months field is 0-based.
-
@blakeyrat i know.
I wanted to highlight that if you put a month >11 javascript will "helpfully" turn the date into a valid one in the next year.
-
@Jarry Well yeah. That way you can use the constructor to do things like construct a date 4 months from another date.
JavaScript doesn't have
.AddMonths()
like C# does.
-
@blakeyrat said in Dates are hard, episode INT(RND()*256):
That way you can use the constructor to do things like construct a date 4 months from another date.
It's better than adding a fixed number of days (or seconds!) since dates (and times) are TRWTF.
-
Some things you can roll your own, but time and date is something you should never try to do!
-
@Sumireko said in Dates are hard, episode INT(RND()*256):
Some things you can roll your own, but time and date is something you should never try to do!
I'd put it like this: Are you a Time Lord? If not, don't roll your own time code.
(I know someone who actually did write their own, and got it right. I'm not that awesome.)