digitalbazaar / cborld

A Javascript CBOR-LD processor for web browsers and Node.js apps.
https://json-ld.github.io/cbor-ld-spec/
BSD 3-Clause "New" or "Revised" License
18 stars 12 forks source link

fix: xsd date codecs #23

Closed tplooker closed 3 years ago

tplooker commented 3 years ago

Resolves an issue that was occurring when the XsdDateTimeCodec was encoding a string that was missing a time component resulting in a date string being returned on decode that featured a zero'd out time component hence not making the encode-decode lossless.

This PR adds another codec for handling values of type date separately and test cases for both codecs.