Support providing default values during parsing #632
Labels
A-parsing
Area: parsing
C-feature-request
Category: a new feature (not already implemented)
C-needs-details
Category: more details are needed to assess the situation
I'm trying to parse a date in the format
YYMMDD
, e.g.231022
. While this crate can parse20231022
, it fails to parse231022
(Playground):This is probably because there is no century information included in the later. It would be nice if it was possible to give default values during parsing, or add an option to assume missing values to be 0 (so I can add 2000 years after parsing) or similar. This would probably also make sense for formats with optional fields.
The text was updated successfully, but these errors were encountered: