Closed Bug 1289340 Opened 5 years ago Closed 5 years ago
.Date Time Format .prototype .format To Parts
58 bytes, text/x-review-board-request
No description provided.
V8 added DateTimeFormat.prototype.formatToParts - https://bugs.chromium.org/p/v8/issues/detail?id=5244 and seems like the API is pretty much verified and frozen, with three implementations (Intl.js, Gecko and Chrome) passing test262 tests suite for it. We should be ready to expose it to content.
Comment on attachment 8790744 [details] Bug 1289340 - Expose Intl.DateTimeFormat.prototype.formatToParts. https://reviewboard.mozilla.org/r/78426/#review77040 The XXX bug you mention claims I'm module owner (which I am not), but IRC word is the staging for this is right, so I think we're good. ::: js/src/builtin/Intl.cpp:1819 (Diff revision 2) > - RootedValue ftp(cx); > + RootedValue ftp(cx); > - HandlePropertyName name = cx->names().formatToParts; > + HandlePropertyName name = cx->names().formatToParts; > - if (!GlobalObject::getSelfHostedFunction(cx, cx->global(), > + if (!GlobalObject::getSelfHostedFunction(cx, cx->global(), > - cx->names().DateTimeFormatFormatToParts, > + cx->names().DateTimeFormatFormatToParts, > - name, > + name, > - 0, &ftp)) > + 0, &ftp)) It'd be better adding this to the JSFunctionSpec for DateTimeFormat instead of preserving this needed-for-conditionality code. But this gets the job done for now, and I can go back and fix it to be the idiomatic way at some later time.
Attachment #8790744 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/3f47a92541c8e445757683d0e3e21e6df5d1a0d2 Bug 1289340 - Expose Intl.DateTimeFormat.prototype.formatToParts. r=waldo
Added the compatibility information and removed the outdated spec. comment. Zibi, can you please verify them again? Sebastian
Flags: needinfo?(sebastianzartner) → needinfo?(gandalf)
You need to log in before you can comment on or make changes to this bug.