|
All date-time values are numeric values representing the number of milliseconds elapsed since January 1, 1970, 00:00:00 GMT. JWT offers various ways of displaying or calculating with date-time values. |
On this page |
Macros are aliases for literal / fixed values. A comprehensive set of time macros is provided to make your expressions more readable.
Macro | Equivalent value |
---|---|
{SECOND} | 1000 |
{MINUTE} | 1000 * 60 |
{HOUR} | 1000 * 60 * 60 |
{DAY} | 1000 * 60 * 60 * 24 |
{WEEK} | 1000 * 60 * 60 * 24 * 7 |
{MONTH} | 1000 * 60 * 60 * 24 * 30 |
{YEAR} | 1000 * 60 * 60 * 24 * 365 |
The following macros return the day of the week:
Macro | Equivalent value |
---|---|
{SUNDAY} | 1 |
{MONDAY} | 2 |
{TUESDAY} | 3 |
{WEDNESDAY} | 4 |
{THURSDAY} | 5 |
{FRIDAY} | 6 |
{SATURDAY} | 7 |
Use these macros in the following functions: |
The following macros return the month:
Macro | Equivalent value |
---|---|
{JANUARY} | 1 |
{FEBRUARY} | 2 |
{MARCH} | 3 |
{APRIL} | 4 |
{MAY} | 5 |
{JUNE} | 6 |
{JULY} | 7 |
{AUGUST} | 8 |
{SEPTEMBER} | 9 |
{OCTOBER} | 10 |
{NOVEMBER} | 11 |
{DECEMBER} | 12 |
Use these macros in the following functions: |
Fields of type date and date-time contain a numeric value with the milliseconds elapsed since January 1, 1970, 00:00:00 GMT.
The number that will be returned by any function using a date or date-time timestamp depends on a time zone.
The following time zones are currently available in JWT:
Time zone | Output |
---|---|
LOCAL or SERVER_LOCAL | Returns the time zone configured for the server running Jira. |
USER_LOCAL | Returns the time zone of the current user. |
RUN_AS_LOCAL | Returns the time zone of the selected Run as user. |
When dealing with times and time zones sometimes you need to convert them to text. The text returned depends on the selected language.
Currently JWT offers the following language parameters:
Time zone | Output |
---|---|
SERVER_LANG | Returns the default language configured for the server running Jira. |
USER_LANG | Returns the language of the current user. |
RUN_AS_LANG | Returns the language of the selected Run as user. |