Date expressions reference guide

Fisheye supports a wide variety of date expressions. A date has the two possible general forms:

  • 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, 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 (separated by a T). The seconds part may contain a fractional component. A / can be used instead of - as a separator.

YYYY-MM-DD

Specifies 00:00:00 on the given date. A / can be used instead of - as a separator.

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

2005-01-02

The start of the day on January 1, 2005 (server's timezone)

2005-01-02-0500

The start of the day on January 1, 2005 at GMT offset -0500 (New York)

2005-01-02T12:00:00Z

Midday, January 1, 2005 GMT

today-P1D

Yesterday (start of day)

today+P1D

Start of tomorrow

thismonth-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

Last modified on Oct 25, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.