Skip to contents

Following the official definition from Gina Trapani, a task can have a due date only. This due date is indicated with the string due: immediately (i.e., no space) followed by a date in ISO format (yyyy-mm-dd).

Extensions of the todo.txt format also specify a start date for a task also frequently referred to as threshold date: the date when a task should appear on a list or in a view. Typically t: is used for indicating a threshold date.

Due dates and threshold dates should appear only once in any task. So only the first occurrence is considered.

Usage

parse_date(todo, prefix = "due")

Arguments

todo

A single task (string) or vector of tasks.

prefix

String to indicate which type of date to search: either t or due; defaults to 'due'.

Value

The due or threshold date that was found after checking whether it is a valid date stamp; if it is not, NA is returned.

Author

Paul Lemmens (paul.lemmens@gmail.com)