I want to be able to capture facts like
Bob was born in 2000 and
Bill's birthday is May 7th.
In both examples we know only part of the person's birth date. In one case we know only the year; in the other case we know the month and day, but not the year.
How do I capture this information?
A few examples of how this might work:
Imagine a library like datetime which allowed None in the fields to represent unknowns. I might have code like the following:
date_a = date(2000, 5, None) date_b = date(2000, 6, None) difference = date_b - date_a assert difference.min.days == 1 assert difference.max.days == 60 # Or something close to 60. assert equal(date_a, date_b) == False date_c = date(2000, 5, None) assert equal(date_a, date_c) == Maybe
This is just an example of how it might behave. I don't necessarily want this precise behavior.