Date.js Parse Method Overrides Javascript Parse Method
I'm including the date.js library in my site because I need its functionality. I have just realized, though, that the standard Javascript parse() method is overwritten by it. I'm
Solution 1:
I know this isn't a direct solution to your problem, but it may help anyway.
If you want a fully featured date library that doesn't modify the native Date
object, I wrote one called Moment.js.
It provides a lot of the things that DateJS provides (formatting, parsing, manipulation, timeago, i18n, etc), but it's smaller, faster, and doesn't ruin the native date prototype.
Solution 2:
Nope, this is the intended design of date.js. It adds to the "prototype" of the Date object. Some people hate that, some people like it - but you've uncovered one of the drawbacks of this design.
Solution 3:
You can tell Highcharts to not use UTC date:
Highcharts.setOptions({global: {
useUTC:false
}
});
You should do this before you create the chart. Then you won't have to worry about converting your dates to UTC, it will be easier.
Post a Comment for "Date.js Parse Method Overrides Javascript Parse Method"