Home | Forums

Date Expressions

FishEye supports a wide variety of date expressions. A date has the general form of either DATE[+-]TIMEZONE[+-]DURATION or DATECONSTANT[+-]DURATION. The TIMEZONE and DURATION parts are both optional.

TIMEZONE can be an offset from GMT HHMM or HH:MM, or simply the letter Z to denote GMT. If no timezone is given, then the FishEye server's configured timezone is used.

DATE can be either of the following:

YYYY-MM-DDThh:mm:ss
Specifies a time and date (seperated by a T). The seconds part may contain a fractional component. A / can be used instead of - as a seperator.
YYYY-MM-DD
Specifies 00:00:00 on the given date. A / can be used instead of - as a seperator.

DATECONSTANT can be any of:

now
This very instant (at the time the expression was evaluated).
today
todaygmt
The instant at 00:00:00 today (server-time* or GMT)
thisweek
thisweekgmt
The instant at 00:00:00 on the first day of this week (Sunday is considered the first day) (server-time* or GMT)
thismonth
thismonthgmt
The instant at 00:00:00 on the first day of this month (server-time* or GMT)
thisyear
thisyeargmt
The instant at 00:00:00 on the first day of this year (server-time* or GMT)

* The timezone used for server-time is part of the FishEye configuration

The syntax for DURATION is similar to the XML Schema duration type. It has the general form PnYnMnDTnHnMnS. See Section 3.2.6 of the XML Schema Datatypes document for more details.

Examples

2021-01-02
The start of the day on January 1, 2021 (server's timezone)
2005-01-02-0500
The start of the day on January 1, 2021 at GMT offset -0500 (New York)
2005-01-02T12:00:00Z
Midday, January 1, 2021 GMT
today-P1D
Yesterday (start of day)
today+P1D
Start of tomorrow
thismoth-P1M
Start of last month
thisyear+P1Y
Start of next year
now-PT1H
One hour ago
now+PT1H2M3S
One hour, two minutes and three seconds from now.