Docmaps-Project / docmaps

Extensible protocol for document history metadata exchange, to enable trustworthy, rapid, open science, by and for preprint science communities.
MIT License
15 stars 1 forks source link

[ts-sdk] Add date from unknown utility type #46

Closed ships closed 1 year ago

ships commented 1 year ago

Description

Various types rely on encoded Dates, however when they are encoded as DateFromISOString they will fail when decoding a structured object with a Date field or a timestamp number. This encoding allows either option as well as string.

Checklist

Additional Information

We may find that we wish to disallow use of a timestamp in these cases, however since these encoders always encode to string, i am not worried about it just yet.