alfred-reminders icon indicating copy to clipboard operation
alfred-reminders copied to clipboard

shorter syntax

Open erusev opened this issue 6 years ago • 3 comments

it'd be great if you could do r 1h instead of r in 1 hour or r 15m instead of r in 15 minutes

erusev avatar Oct 09 '18 15:10 erusev

p.s. this shorter syntax is supported in google reminders

erusev avatar Oct 09 '18 15:10 erusev

Yup, it would be great to have that.

Date parsing is done via chrono.js

I guess this is dependent on chrono.js' support for the abbreviations in https://github.com/wanasit/chrono/issues/261.

kenston avatar Apr 27 '19 11:04 kenston

In the meantime, my workaround is to replace/expand the original query like from 2m to 2 minutes. This is done by changing the portion in the Script Filter from:

function run(argv) {
	var query = argv[0],
        ...
}

to

function run(argv) {
	var query = argv[0].replace(/(\d+)m/, "$1 minutes").replace(/(\d+)h/, "$1 hours"),
        ...
}

This is just temporary as there seems to be an updater included which might revert it back.

kenston avatar Apr 27 '19 11:04 kenston