TIMEW-DATES(7)

NAME
timew-dates - date formats supported by Timewarrior

SYNOPSIS

DESCRIPTION

Timewarrior supports the following datetime formats based on ISO-8601. If times are followed by a 'Z', they are assumed to be in UTC, otherwise local time (TZ) is assumed.

    <extended-date> [T <extended-time>]   Extended date, optional extended time
    <date> [T <time>]                     Date, optional time
    <extended-time>                       Extended time
    <time>                                Time

extended-date

        YYYY-MM-DD                          Year, month, day
        YYYY-MM                             Year, month, 1st
        YYYY-DDD                            Year, Julian day 001-366
        YYYY-WwwD                           Year, week number, day number
        YYYY-Www                            Year, week number, day 1

extended-time

        hh:mm[:ss]Z                         Hours, minutes, optional seconds, UTC
        hh:mm[:ss][+/-hh:mm]                Hours, minutes, optional seconds, TZ

date

        YYYYMMDD                            Year, month, day
        YYYYWww                             Year, week number, day number
        YYYYDDD                             Year, Julian day 001-366

time

        hhmm[ss]Z                           Hour, minutes, optional seconds, UTC
        hhmm[ss][+/-hh[mm]]                 Hour, minutes, optional seconds, TZ

EXAMPLES

Here are some examples for ISO datetimes:

    2016-06-09T08:12:00Z
    2016-06T08:12:00+01:00
    2016-06T08:12Z
    2016-161
    2016-W244
    2016-W24
    20160609T081200Z
    2016W24
    8:12:00Z
    0812-0500

In addition to the standard date formats, the following named dates are supported:

    now                                   Current date and time
    today                                 Current date at 0:00:00
    yesterday                             Yesterday at 0:00:00
    tomorrow                              Tomorrow at 0:00:00 (midnight tonight)
    <day-of-week>                         Previous named day at 0:00:00
    <month-of-year>                       Previous 1st of the month at 0:00:00
    hh:mm[:ss][am|a|pm|p]                 Short time format
    Nst, Nnd, Nrd, Nth                    Previous 1st, 2nd, 3rd ...
    <epoch>                               POSIX time (at least 315532800)
    later                                 2038-01-18T0:00:00 (Y2K38)
    someday                               2038-01-18T0:00:00 (Y2K38)
    sopd, eopd                            Start/end of previous day
    sod, eod                              Start/end of current day
    sond, eond                            Start/end of next day
    sopw, eopw                            Start/end of previous week
    sow, eow                              Start/end of current week
    sonw, eonw                            Start/end of next week
    sopww, eopww                          Start/end of previous work week (mon - fri)
    soww, eoww                            Start/end of current work week (mon - fri)
    sonww, eonww                          Start/end of next work week (mon - fri)
    sopm, eopm                            Start/end of previous month
    som, eom                              Start/end of current month
    sonm, eonm                            Start/end of next month
    sopq, eopq                            Start/end of previous quarter
    soq, eoq                              Start/end of current quarter
    sonq, eonq                            Start/end of next quarter
    sopy, eopy                            Start/end of previous year
    soy, eoy                              Start/end of current year
    sony, eony                            Start/end of next year
    easter                                Easter Sunday
    eastermonday                          Easter Monday
    ascension                             Ascension
    pentecost                             Pentecost
    goodfriday                            Good Friday
    midsommar                             midnight, 1st Saturday after 20th June
    midsommarafton                        midnight, 1st Friday after 19th June
    juhannus                              midnight, 1st Friday after 19th June

For times, the following are also possible:

    8am
    24th
    monday
    august

NOTES

The minimum value for the POSIX time format of 315532800 (that is 1980-01-01) was chosen to avoid confusion with ISO dates in the YYYYMMDD format.

Because named dates are defined with time 0:00:00, using them as range end excludes the respective day. E.g. using 'today' as upper range

    $ timew sum 2d before today

will not show any intervals of the current day. Use either 'now' or 'tomorrow' in this case:

    $ timew sum 2d before now
    $ timew sum 2d before tomorrow

SEE ALSO

timew-durations(7), timew-hints(7)