The point raised about âfuzzyâ (incomplete) dates get to the heart of this. We, without stopping to consider, happily chop between proximate âdiaryââ time where date/time down to the minute and second may matter so warrants consideration, versus broader âhistoricalââ times. Do we need to know the state of the tide when Julius Caesar disembarked in Kent to conquer the Britons? The day would be nice but at this distance a year (if known!) would suffice. But, if planning to attend the upcoming departmental meeting nexts a finer granularity than ânext weekâ.
Although humans happily chop between these two, code has no such choice. Plus, the two shade into one another. The boundary is subjective. Where âthe pastâ starts will differ for an 80-year-old compared to a 20-year-old.
Tinderbox Date-type attributes are essentially a Date/Time attribute. Indeed, in early documentation they were called that. They canât not store a time element. Why? because how they work is they store a numberâthe number milliseconds from a fixed point âĄâand use that to work out the appropriate date/time.
Tinderbox provides date formatting codes (as @PaulWalters noted previously) such that the label we see on screen representing a date/time might appear as â44 BCEâ not â1 Jan 44 BCE 00:00:01â, or such.
âToo complicatedâ, we cry, âthe app should, nay must, just figure this out for usâ. If only. For the app to do that weâd need to signal out intent, but thatâs intuitive to us so we find it hard to articulate ⌠and anyway why canât the software just guess correctly for us? Plus, the app is a toolset not a per-build limited-scope process.
So what are the pragmatic choices available?
Donât use Date-type is you donât need to. You need Date-type data to use timeline view and to do Date-based arithmetic. But if you donât require either/both those then you might just be better off using a string to hold a date (eq.v. system attribute $PublicationYear is not a Date as it only ever holds a string with the year of publication).
As regards fuzzy/partial dates, you canât store a Date-type of âFebruary 1425â as there must be a day and time if not given is normally auto-added as system time of day at point if edit. So if you need to use dates, and for some to be missing day or month, it is a good idea to decide on a day/month to use as a default (1 on month vs. end or middle, January vs July, etc.) , record that in your TBX (as youâll forget) and use that rubric when setting in complete date-type dates.
You can have both if you want, a date type date for use in, for instance, timeline and a string for general use. But again, do note this as if you change one youâll need to change the other. The app canât always guess and even then having code constantly look for occasional manual edits is poor use of automation.
Another aspect of fuzzy dates is you donât have to use just the system $StartDate & $EndDate. You could, add a $NotBeforeDate and $NotAfterDate you give flex for start end. Or, more complex, a $NotStartBefore, $NotStartAfter, $NotEndBefore, NotEndDafter. But, this is an exercise for us the user. If we know weâll do the same in several projects, make a âstubâ document with lots of the customisation pre-done, then for a new projects, copy the stub and use the copy as your project document.
I point to note, is that as the user, you are in charge so make and implement the decisions (within the available toolbox of features).
So whilst doing all the other âsandboxâ trials, for a historical project consider what is useful to you in terms of how dates and their many and varied oddities are best annotated in your project going forward.
If looking for help in this it is generally better to ask âIâm planning to do X, does this make sense?â rather than as tends to happen âIs anyone doing X?â Even if they are, likely it is slightly different from your needs, so itâs better to ask form the context of oneâs own work. Itâs rare somebody has done exactly the same before. But lots of different people may have don similar parts of the whole, albeit in a different context.
HTH
â . The terms/distinctions are mineâdoubtless there may be established terms for this of which Iâm unaware. Please correct me if so!
âĄ. From the Unix epoch, if memory serves. But, for almost all of use such underlying detail is moot. A Date/time is a number based on a fixed reference date/time.