5
xewl
7y

$ git commit -am '"Fuck you, ISO 8601! NaN!" - Apple'

Comments
  • 0
    There's buildin function for getdate etc. Why do you split?
  • 1
    @sunfishcc
    ISO 8601 -> "Y-m-d H:i:s"
    What I did:
    var someDate = new Date(some_date_string_in_iso8601);
    What I outputted:
    someDate.getDate() + '/' + (someDate.getMonth() + 1) + ( someDate.getFullYear() != someDate.getFullYear() ? '/'+someDate.getFullYear() : '') + ' ' + someDate.getHours() + ':' + someDate.getMinutes();

    What it should show: "28/2 17:23"
    Where it works: everywhere...

    Where it doesn't: iOS Chrome & Safari
    What it shows...:
    "NaN/NaN NaN:NaN"

    I just got a notification from work.
    They thought I had made a Batman bug, because I hate iOS.
    NaNaNaNaNaNa, Batman!
  • 0
    @xewl I see. It seems like a very common problem between safari and chrome 😓
  • 0
    @sunfishcc Ridiculous, right? ><,
Add Comment