That seems like a sensible suggestion - it's how OHMs custom osm2pgsql script works - via a Lua script which converts the text strings start_date to a date field and creates another field to convert that into an integer - start_date_int. The map queries use the integer version, they could use the date type as date ranges do work natively within many databases but it depends on the implementation - Postgres for example limits the earliest possible Date to 4713 BC which is 0 in the Julian calendar, which may exclude some more ancient things in OHM.
Cheers, Tim On 3 May 2015 at 18:06, Richard Welty <[email protected]> wrote: > it turns out that there is a proposal for broader > numerical comparison operators and the author of the > proposal is open to including time as something that > can be compared. i've suggested starting off simple, > allowing comparison of tags for which the value is a > simple ISO format date, such as start_date and end_date. > the dates would be parsed and normalized into an integer > value for comparison. the baseline for the date->integer > mapping is open for discussion but as it's a purely internal > value, it can be changed if it needs to be. > > this seems like a way to get a useful capability quickly. > > richard > > -- > [email protected] > Averill Park Networking - GIS & IT Consulting > OpenStreetMap - PostgreSQL - Linux > Java - Web Applications - Search > > > > _______________________________________________ > Historic mailing list > [email protected] > https://lists.openstreetmap.org/listinfo/historic > >
_______________________________________________ Historic mailing list [email protected] https://lists.openstreetmap.org/listinfo/historic
