protobuf-es icon indicating copy to clipboard operation
protobuf-es copied to clipboard

Support google.type.(date|datetime|timeofday)

Open derekperkins opened this issue 2 years ago • 2 comments

There is already native helper support for google.protobuf.Timestamp, and while google.type.* aren't WKTs, they're pretty close. Since it will all be coerced to a JS Date, similar helpers could be provided for these three types.

cc @tannerlinsley

derekperkins avatar Sep 08 '22 23:09 derekperkins

Thanks for the request, Derek, also for the related #226.

Conversion between DataTime and a JavaScript Date object might be the lowest hanging fruit here, although it may be non-trivial to support IANA timezones (the only standard API is buried in Intl.DateTimeFormat).

timostamm avatar Sep 09 '22 15:09 timostamm

I also shared the inconsistent behavior when using google.type.*

https://github.com/bufbuild/connect-web/issues/262

xmlking avatar Oct 29 '22 17:10 xmlking