Next: Creating Timestamps, Up: Dates and Times [Contents][Index]
A timestamp is a specification of a date (possibly with a time or a range of times) in a special format, either ‘<2003-09-16 Tue>’ or ‘<2003-09-16 Tue 09:39>’ or ‘<2003-09-16 Tue 12:00-12:30>’59. A timestamp can appear anywhere in the headline or body of an Org tree entry. Its presence causes entries to be shown on specific dates in the agenda (see Weekly/daily agenda). We distinguish:
A simple timestamp just assigns a date/time to an item. This is just like writing down an appointment or event in a paper agenda. In the agenda display, the headline of an entry associated with a plain timestamp is shown exactly on that date.
* Meet Peter at the movies <2006-11-01 Wed 19:15> * Discussion on climate change <2006-11-02 Thu 20:00-22:00>
A timestamp may contain a repeater interval, indicating that it applies not only on the given date, but again and again after a certain interval of N days (d), weeks (w), months (m), or years (y). The following shows up in the agenda every Wednesday:
* Pick up Sam at school <2007-05-16 Wed 12:30 +1w>
For more complex date specifications, Org mode supports using the special expression diary entries implemented in the Emacs Calendar package60. For example, with optional time:
* 22:00-23:00 The nerd meeting on every 2nd Thursday of the month <%%(diary-float t 4 2)>
Two timestamps connected by ‘--’ denote a range. The headline is shown on the first and last day of the range, and on any dates that are displayed and fall in the range. Here is an example:
** Meeting in Amsterdam <2004-08-23 Mon>--<2004-08-26 Thu>
Just like a plain timestamp, but with square brackets instead of angular ones. These timestamps are inactive in the sense that they do not trigger an entry to show up in the agenda.
* Gillian comes late for the fifth time [2006-11-01 Wed]
The Org date format is inspired by the standard ISO 8601 date/time format. To use an alternative format, see Custom time format. The day name is optional when you type the date yourself. However, any date inserted or modified by Org adds that day name, for reading convenience.
When working with the standard diary expression functions, you
need to be very careful with the order of the arguments. That order
depends evilly on the variable calendar-date-style
. For example, to
specify a date December 12, 2005, the call might look like
‘(diary-date 12 1 2005)’ or ‘(diary-date 1 12 2005)’ or ‘(diary-date
2005 12 1)’, depending on the settings. This has been the source of
much confusion. Org mode users can resort to special versions of
these functions like org-date
or org-anniversary
. These work just
like the corresponding diary-
functions, but with stable ISO order
of arguments (year, month, day) wherever applicable, independent of
the value of calendar-date-style
.
Next: Creating Timestamps, Up: Dates and Times [Contents][Index]