1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00

Fix Date built-in attribute defaults (true, false, true)

This commit is contained in:
Robert Krimen 2013-06-03 18:31:30 -07:00
parent 55565afada
commit 32164a41c9
2 changed files with 6 additions and 1 deletions

View File

@ -94,6 +94,11 @@ func TestDate(t *testing.T) {
// Date()
test(`typeof Date()`, "string")
test(`typeof Date(2006, 1, 2)`, "string")
test(`
abc = Object.getOwnPropertyDescriptor(Date, "parse");
[ abc.value === Date.parse, abc.writable, abc.enumerable, abc.configurable ];
`, "true,true,false,true")
}
func TestDate_parse(t *testing.T) {

View File

@ -662,7 +662,7 @@ func newContext() *_runtime {
)
self.Global.Date.write(
_propertyMode(0),
_propertyMode(0101),
"parse", builtinDate_parse,
"UTC", builtinDate_UTC,
)