Modify

Opened 9 months ago

Last modified 9 months ago

#21429 new enhancement

Enable relative timestamp search

Reported by: smootheFiets Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: 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

Attachments (0)

Change History (1)

comment:1 Changed 9 months ago by skyper

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.

Modify Ticket

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

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.