Hello,
We have a web application that gets its data from a certain database. The product writing to that database has been localized to RUSSIAN, thus its data, in particular the dates had been localized too.
We encountered a problem where our DATES would not show on our application. We traced the problem to an invalid Date.parse() javascript call.
Example:
<html>
<body>
<script type="text/javascript">
var value = Date.parse("01/31/2009 08:00:00 AM");
document.write(value);
</script>
</body>
Would return 1260576000000.
However,
<html>
<body>
<script type="text/javascript">
var value = Date.parse("31.01.2009 08:00:00 AM");
document.write(value);
</script>
</body>
Would return NaN.
Is there a way to parse localized dates in Javascript?
Thanks!