Opened 3 years ago
Last modified 4 months ago
#21429 new enhancement
Enable relative timestamp search
Reported by: | smootheFiets | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | search date | Cc: |
Description
JOSM search supports absolute timestamp searches like "timestamp:/2019" meaning "timestamp of last edit before 2019-01-01.0." I'd like to perform relative searches, i.e., to find objects older/younger than some number of days/years/microseconds. I don't seem to see that capability, but maybe I'm overlooking something? It would be useful for quality-assurance type of work, and it would be easy to implement (I guess).
My immediate use case is the JOSM validator. I've set up a validator.mapcss file that throws warnings at objects that may be outdated on OSM (https://github.com/smootheFiets/validator/blob/master/outdated.validator.mapcss). The timestamp search is out-sourced to JOSM like "[JOSM_search("timestamp:/2019")]". Hard-wiring the date into the code strikes me as undesirable; it means I have to update the file every year or so for trivial reasons. Surely there must be a more elegant way?
Obviously, a solution that works in straight mapcss instead of JOSM search is fine by me.
PS: I've asked the same question in the OSM forum, receiving no answers. I take this to mean that, currently, this is not a capability that JOSM has. Please correct me if I'm wrong!
https://forum.openstreetmap.org/viewtopic.php?id=73802
Sorry, for not responding, but yes there is not support, yet.
I have some rules where I like to get the current date and compare it with a value. E.g. I want to warn if the
gtfs:release_date=2020-01-07
is older than 1½ years.