I'm playing around with some historical data wherein some dates I know accurately (i.e. dd/mm/yyyy) whilst others are just yyyy and others are yyyy? (i.e. the year is uncertain). I've even come across fl, which apparently means "flourished".
At the moment I'm using the DateTime class which doesn't seem to support the flagging/representation of such uncertainty. Is there a standard way of addressing this problem?
I would consider creating a class that wraps a DateTime (or DateTimeOffset) and has additional fields to represent which portions of the date are certain and which are not.
You could then expose month, day, and year fields as nullable values to reflect which portions of the date are known.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With