-
-
Notifications
You must be signed in to change notification settings - Fork 813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avm2: Implement Date using ActionScript #17727
Conversation
core/src/avm2/globals/Date.as
Outdated
|
||
public static native function parse(param1:*):Number; | ||
|
||
public static native function UTC(param1:*, param2:*, param3:* = 1, param4:* = 0, param5:* = 0, param6:* = 0, param7:* = 0, ... rest):Number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually try to keep the naming from docs/playerglobal. These names do show up in exception messages (though currently not sure if this can happen in Ruffle, better have correct names just in case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the name in the playerglobal.
core/src/avm2/globals/Date.as
Outdated
} | ||
prototype.toString = function():String { | ||
var d:Date = this; | ||
return d.AS3::toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make sure that this generates proper bytecode? (I think it should, given globals.as, but let's make sure just in case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't open this class in JPEXS. I did test that Date.prototype.toString.call()
works. (But somehow it doesn't in Flash, which I don't understand)
d2e825a
to
25af1d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I don't think we need to worry about the weirdness with calling the prototype methods indirectly.
No description provided.