Added Date support for RhinoWrapper#10
Conversation
(use class-injection in 'org.mozilla.javascript')
|
org.mozilla.javascript.NativeDate? Yes, it was always there (since Publish Rhino as open source). But getJSTimeValue-method available since this commit. |
|
So, the method it's there for, like, 10 years. Well, in the 2.3.X line we still have to keep backward compatibility even with that... I know, it's extreme. As of unit tests and so, I don't get what you mean. So there's an app that uses some early Rhino, and they update FM under it. They had no proper date support earlier, and they won't have it now either. Things keep working. But if now they get a linkage exception... that's bad. Speaking of which, even if the app has a fresher Rhino, that we suddenly treat dates properly can break the app too. So this will have to be enabled only if they explicitly ask for it. Ouch. OTOH that means that then we can demand a high enough Rhino version, instead of doing trickier checks. |
use class-injection in 'org.mozilla.javascript' (unfortunately NativeDate class is package protected)
alternative is reflection-based implementation in my rhino-dates branch