Excellent, thank you. if this week is kind to me I'll hopefully have the patch set ready to review by mid to late week.
On Monday, February 26, 2024 at 3:05:22 AM UTC-8 les...@chromium.org wrote: > Hi James, > > Thanks for asking, this seems like a reasonable set of APIs to add, I'll > happily review a patch. > > - Leszek > > On Sat, Feb 24, 2024 at 8:30 PM 'James Snell' via v8-dev < > v8-...@googlegroups.com> wrote: > >> Hello all :-) >> >> Before going through and doing the work, I wanted to ask if the project >> would be open to a contribution for the following additions to the v8::Date >> C++ API >> >> 1. `v8::Date::ToUTCString()` ... this would be nearly identical to the >> existing `v8::Date::ToISOString()` method except it would generate the UTC >> format. This requires only a couple lines of code added to api.cc. >> >> 2. `static v8::Date::Parse(context, string)` ... this would create a new >> `v8::Date` (like `v8::Date::New(..)` from an input string (equivalent to >> `new Date(string)` in JS). This would likely require moving the >> `ParseDateTimeString(...)` private method currently located in >> builtins-date.cc to a public API that can be accessed from api.cc. >> >> Currently, an embedder wishing to accessing these has to grab the >> appropriate methods off the `Date` prototype in javascript which is a >> bit... cumbersome. >> >> I've implemented a draft patch of the suggested APIs here: >> https://github.com/cloudflare/workerd/pull/1724/files >> >> -- >> -- >> v8-dev mailing list >> v8-...@googlegroups.com >> http://groups.google.com/group/v8-dev >> --- >> You received this message because you are subscribed to the Google Groups >> "v8-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to v8-dev+un...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/v8-dev/c545cb02-ec6e-415a-8aa4-0084a5c725b1n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/v8-dev/c545cb02-ec6e-415a-8aa4-0084a5c725b1n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/898142fd-e10b-4810-9470-3c3c32d8bd84n%40googlegroups.com.