I want to treat dates as a data type, so that I can work out the duration of recessions. It doesn't seem to be possible. Can that be altered so that data itself can have a date type?
This would add great strength to our Unit handling as well BTW. One neat trick Mathcad (gawd I miss that program!) had was that you could attach a unit specifier to a formula, and it would change the result to suit. So putting "Days" as a unit on a calculation involving data dimensioned by Year would convert the result into Days automatically.
In general, supporting Units in Ravel would be a huge improvement over standard BI programs. Data could be dimensioned by Dollars/Money, People, Tonnes... Calculations would then generate unit-dimensioned data: wages in dollars per person per year etc.
Two things here. The first would be to read time data as data. This would need to leverage the format field, as per https://sourceforge.net/p/minsky/ravel/387/ . We could then create a unit that means seconds since epoch (Jan 1st 1970), and double precision data will probably be sufficient for most purposes (1500-9999 CE), but will need to check.
The second thing being requested here is the conversions feature
I wonder if we (and everyone before us) is trying to load too much into a
single unit for time. That was the genesis of the Y2K bug, it's why Excel
can't handle pre-1900 dates, etc.
And yet today we have scientists analysing data sets going back a billion
years on this planet, and longer when analyzing astronomical data.
So here's an idea--maybe for a future Ravel. Have both a time measure, and
a (minimum) time step. No-one doing astronomical observations works at the
accuracy of seconds, for example. Their minimum time step (with double
precision data) would be Years ((I'm guessing here: would double-precision
cover every year since the BB?). Fossil age analysis would also fit in
there I guess. At the other end of the spectrum, physicists analysing data
our of CERN need, what, picosecond accuracy? So how many numbers would they
need to cover the full range of data they'd get out of an experiment?
We need a combination of the number of records feasible in a data set, and
the unit at which that data set steps.
https://en.wikipedia.org/wiki/Orders_of_magnitude_(time)
Ticket moved from /p/minsky/ravel/395/