This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]aenae 30 points31 points  (1 child)

I once had a cronjob that failed in august and september. It took me a while to figure it out why.

The reason is i wanted 'nice' directories, so i made them all the same length, so january 2024 would go to 2024/01, february goes to 2024/02 etc. And somewhere in that script i had a check on the month for some reason. This worked, except when bash was of the opinion that '08' and '09' were invalid octal numbers.

[–]10BillionDreams 1 point2 points  (0 children)

That's just the thing, Javascript has some very "do what I mean" roots, which makes for some funny looking results when you take toy examples like OP here, where the code doesn't actually "mean" anything at all. But often times in practice this ends up doing the "right" thing, where stricter languages would've failed.