fmidev / fmi-avi-messageconverter

API classes for aviation weather message handling
MIT License
4 stars 6 forks source link

Make PartialDateTime compliant with ISO 8601 without year #39

Open petringo opened 5 years ago

petringo commented 5 years ago

Currently PartialDateTime simply omits any non-existent date/time fields in it's textual representation (toString(), parse()). Missing year should be changed ISO 8601 compliant, by adding single - in at the beginning. Although this representation is now disallowed by the standard, it is still widely used where applicable (e.g. Java MonthDay).

This is a breaking change. The textual representation is also used as JSON-serialized representation.

petringo commented 5 years ago

Additionally, trailing : could be omitted.