[Therion] Therion date ranges
Olly Betts
olly at survex.com
Sun Aug 2 22:53:09 CEST 2026
On Sat, Aug 01, 2026 at 09:36:45PM +1200, bruce at tomo.co.nz wrote:
> Survex date specification seems to be more flexible, allowing multiple
> distinct dates as well as ranges.
Survex allows either a single date or a range between two dates.
Ranges are mostly allowed because of (a) overnight survey trips and
(b) surveys with incomplete date information (from experience you can
often bound the dates from other sources - e.g. on an expedition you
might know when the surveyors on the trip arrived and left, you know it
must be after the trip which established the survey station this survey
tied to, etc).
If a survey really contains data from multiple distinct dates, you can
put additional *date commands mixed in with the data and the active one
will apply to survey legs which follow it, but it seems better practice
to make new surveys for that case, which can be made sub-surveys in
Survex's hierarchy if you want.
I'm guessing you just looked at the examples in the Survex manual as
the text below them seems to make this clear, but if it wasn't clear
to you suggestions for improving it are welcome.
The original Survex date format used dots to separate date components
and a dash to indicate a range, e.g.
*date 1985.08.12-1985.08.13
However people (quite reasonably) wanted to be able to use the standard
ISO date format (1985-08-12). Because the day or day-and-month can be
omitted, it seemed best to provide an alternative new format where
the range ends were separated by whitespace, so in modern Survex this
means *EXACTLY THE SAME* as the example above:
*date 1985-08-12 1985-08-13
This is now the strongly recommended format (and also supports types of
date; the old format is implicitly always the "surveyed" date).
> May I suggest that some date related warnings be added to Therion:
>
> * [author] [explorer] [topo] [copyright] date range in reverse order
> in [object name]
> * date earlier than 1900 AD in [object name]
> * future date specified in [object name]
FWIW, Survex has these date parsing/interpretation related warnings:
warning: End of date range is before the start (then swap and process)
warning: Assuming 2 digit year is 19%02d (%02d replaced by the 2 digits)
warning: Date is in the future!
warning: Invalid day of the month
warning: Invalid year (< 1900 or > 2078)
warning: Interpreting as an ISO-format date - use “*date surveyed %d-%02d” to suppress this warning, or “*date %d %d” if you wanted a date range
The last one is because `*date 1911-12` meant a range from 1911 to 1912
in the original Survex *date format, but December 1911 as a (partial)
ISO-date. This seemed a real corner case that was very unlikely to
occur in real data (it can only affect year-to-year ranges where the
start and end are both <= 1912 and the "19" is specified on the first
year but not on the second) so the meaning of this actually changed, but
with a warning to suggest you make clear which you mean by using either:
*date surveyed 1911-12 ; December 1911
*date 1911 1912 ; year range
(Some of these warnings would probably be better as errors if starting
from scratch, but were made warnings to avoid breaking processing of
existing datasets.)
Cheers,
Olly
More information about the Therion
mailing list