Reputation: 159
In my app i am trying to create new date in javascript. Datetime returned from server is in following format:
септембар, 25 2013 19:40:44
I have tried to create date using new Date() and also Date.parse, both of them failed. new Date() gives me Invalid Date, and Date.parse gives me NaN. Any suggestions?
Upvotes: 2
Views: 678
Reputation: 1329
In my console,
new Date('Septembar, 25 2013 19:40:44')
returns
Wed Sep 25 2013 19:40:44 GMT-0400 (EDT)
but
new Date('септембар, 25 2013 19:40:44')
returns
Invalid Date
JavaScript must not support that charset and you will have to convert it before passing it as a parameter.
Upvotes: 1