+ Add Question

API / addItem / Due Date

CB

Using the standard (non sync) api, what's the approved format to use for a date when setting the addItem api call? Should it be urlencoded? Should it be a javascript time?

Thanks

All responses

David Trey staff
Replied on Mar 12, 2014 - 21:47

Hello Chris,

It's always good to urlencode anything :-) As for the date, it's explained in this documentation: https://todoist.com/API/#items

Optional parameters:

date_string: The date of the task, added in free form text. Examples of how date_string could look like: https://todoist.com/Help/timeInsert

js_date: If js_date is set to 1 dates will be formated as new Date("Sun Apr 29 2007 23:59:59"), otherwise they will be formatted as "Sun Apr 29 2007 23:59:59".


Best regards,
David