https://github.com/cdent/tiddlywebplugins.relativetime
Use relative time indicators in tiddlyweb select filters
https://github.com/cdent/tiddlywebplugins.relativetime
Last synced: about 1 year ago
JSON representation
Use relative time indicators in tiddlyweb select filters
- Host: GitHub
- URL: https://github.com/cdent/tiddlywebplugins.relativetime
- Owner: cdent
- License: other
- Created: 2011-03-02T14:30:34.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2011-11-12T19:29:07.000Z (over 14 years ago)
- Last Synced: 2025-02-01T03:28:52.891Z (over 1 year ago)
- Language: Python
- Homepage: http://tiddlyweb.com/
- Size: 97.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Extension to tiddlyweb select filters to use relative time statements.
Where a filter is:
select=modifier:>2011
one could expect either a tiddlywiki timestamp string, a fragment
thereof, or some numbers that end with 'd', 's', 'm', 'h', 'y' (case
insensitive) meaning Days, Seconds, Minutes, Hours, Years. We don't
worry about months. If the trailing letter is there, we translate it
into an absolute time in the past, relative to now.
It's important to note that the translation happens _before_ the > or
< is interpreted. So while
select=modified:>1d
at first glance reads as "select those entities with a modified more
than one day ago" it is actually, if we say today is 20110302, "select
those entities with a modified greater than 20110302" (i.e. those thing
modified within the last day).