Opened 3 years ago

Last modified 6 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:


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 ( 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!

Attachments (0)

Change History (2)

comment:1 by skyper, 3 years ago

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.

comment:2 by skyper, 6 months ago

Keywords: search date added

See also #23375

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to smootheFiets.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.