Skip to main content

Use relative time expressions in select filters

Project description

Extension to tiddlyweb select filters to use relative time statements.

Where a filter is:

select=modifier:>2011

once 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).

Copyright 2011, Chris Dent <cdent@peermore.com>

BSD License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tiddlywebplugins.relativetime-0.3.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file tiddlywebplugins.relativetime-0.3.tar.gz.

File metadata

File hashes

Hashes for tiddlywebplugins.relativetime-0.3.tar.gz
Algorithm Hash digest
SHA256 93adfc5c18b4c3dab499a6293f0cf64b2ff1c020a0ed285c4f2b0e2644442e1a
MD5 4be0d063ac9c1014cceef64cd82fb716
BLAKE2b-256 95352f40056614fde124eea762e3531fa86959bf79ac6b656a8f8c5477fbc730

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page