Enable Injection of Date Parser

Issue #23 invalid
Nicolai Parlog created an issue

Unless I am overlooking something, Jose4j requires dates (like nbf) to be in the form "seconds since epoch". The standard says:

Its value MUST be a number containing a NumericDate value.

Do I understand this correctly that non-numerical representations of date/time (like ISO 8601) are no legal values and should be rejected?

Otherwise it would be nice to have a way to inject a parser for the date/time fields.

PS: It's fun to work with Jose4J, keep up the good work.

Comments (3)

  1. Nicolai Parlog reporter

    Well, that was stupid...

    NumericDate A JSON numeric value representing the number of seconds from 1970- 01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds. This is equivalent to the IEEE Std 1003.1, 2013 Edition [POSIX.1] definition "Seconds Since the Epoch", in which each day is accounted for by exactly 86400 seconds, other than that non-integer values can be represented. See RFC 3339 [RFC3339] for details regarding date/times in general and UTC in particular.

    (From the standard.)

  2. Log in to comment