You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/359711-date-parse-is-not-compatible-with-native-date-parse?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github).
The text was updated successfully, but these errors were encountered:
I just stumbled across this issue while updating some old libraries.
The bug seems to be somewhere in MooTools More.
In the past, we had a customized version, which didn't have the bug, and with the update I installed More with all features.
The problem is, I can't remember, which features I used in the customized version ...
Well, MooTools by default overwrites the native Date.parse method of the native Date object with it's own parse method that returns a Date object instead of a number.
We have a site analysis tool that uses a small javascript our customers add to their page to get goal tracking and survey support.
Our script used the Date.parse method and when a customer using MooTools added our script it did not work since the native Date object's parse method no longer returned the correct data.
It's a very bad idea to overwrite native functions and not return the expected result!
Why is this done anyway? This doesn't make much sense to me, but maybe I don't see the "big picture" ...
MooTools Date.parse method returns a Date object while the native Date.parse method returns milliseconds.
This breaks third party code that depends on parse for timestamps, and the cause is hard to find.
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/parse
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/359711-date-parse-is-not-compatible-with-native-date-parse?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github).The text was updated successfully, but these errors were encountered: