org-read-date

org-read-date is a compiled Lisp function in `org.el'.

(org-read-date &optional ORG-WITH-TIME TO-TIME FROM-STRING PROMPT DEFAULT-TIME DEFAULT-INPUT INACTIVE)

Read a date, possibly a time, and make things smooth for the user.
The prompt will suggest to enter an ISO date, but you can also enter anything
which will at least partially be understood by `parse-time-string'.
Unrecognized parts of the date will default to the current day, month, year,
hour and minute. If this command is called to replace a timestamp at point,
or to enter the second timestamp of a range, the default time is taken
from the existing stamp. Furthermore, the command prefers the future,
so if you are giving a date where the year is not given, and the day-month
combination is already past in the current year, it will assume you
mean next year. For details, see the manual. A few examples:

3-2-5 --> 2003-02-05
feb 15 --> currentyear-02-15
2/15 --> currentyear-02-15
sep 12 9 --> 2009-09-12
12:45 --> today 12:45
22 sept 0:34 --> currentyear-09-22 0:34
12 --> currentyear-currentmonth-12
Fri --> nearest Friday after today
-Tue --> last Tuesday
etc.

Furthermore you can specify a relative date by giving, as the *first* thing
in the input: a plus/minus sign, a number and a letter [hdwmy] to indicate
change in days weeks, months, years.
With a single plus or minus, the date is relative to today. With a double
plus or minus, it is relative to the date in DEFAULT-TIME. E.g.
+4d --> four days from today
+4 --> same as above
+2w --> two weeks from today
++5 --> five days from default date

The function understands only English month and weekday abbreviations.

While prompting, a calendar is popped up - you can also select the
date with the mouse (button 1). The calendar shows a period of three
months. To scroll it to other months, use the keys `>' and `<'.
If you don't like the calendar, turn it off with
(setq org-read-date-popup-calendar nil)

With optional argument TO-TIME, the date will immediately be converted
to an internal time.
With an optional argument ORG-WITH-TIME, the prompt will suggest to
also insert a time. Note that when ORG-WITH-TIME is not set, you can
still enter a time, and this function will inform the calling routine
about this change. The calling routine may then choose to change the
format used to insert the time stamp into the buffer to include the time.
With optional argument FROM-STRING, read from this string instead from
the user. PROMPT can overwrite the default prompt. DEFAULT-TIME is
the time/date that is used for everything that is not specified by the
user.