garyhodgson / ubiquity-rtm-api

Ubiquity Command for RTM
http://garyhodgson.com/ubiquity/rtm-api.html
4 stars 0 forks source link

Date Parsing on rtm-add-task #10

Open kraftbj opened 15 years ago

kraftbj commented 15 years ago

If using an actual date, the date will not parse.

Example: rtm-add-task Test Task 5/31/2009 to listname will be added as "Test Task 5/31/2009" to the listname list with no due date.

garyhodgson commented 15 years ago

Sadly this looks to be a limitation of the API call, which tries to find a date in the task title (e.g. "do something today" would understand 'today'), and this appears not to recognise dates in the mm/dd/yyyy format.

There are two options that come to mind: it would be relatively trivial for me to write a 'set due date' command, which can be invoked after a task has been added .. and this can have the format mm/dd/yyyy etc.

A second idea is to add a parameter to the add-task command called 'due' which allows the date to be set explicitly. The only problem I see with that at the moment is that the Ubiquity command api restricts the number of parameters it can process (and in fact I think the current set is too long by one parameter). Still, I will have a play around and see what can be done.