Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Variable path

Date object property

Type

Description

Sample value

${

formatDateTime

}

String

the date and time

of current repeating occurrence

in Jira

datetime format

format used when display dates

11/sep/16 1:15 PM

${formatDate}date of current repeating occurrence in Jira date format

formatDateTimePicker

String

the date and time in Jira format used in date picker

11.09.2016 13:15

formatDate

String

the date in Jira Jira format used when display dates

11/sep/16

${formatDateISO}date of current repeating occurrence

formatDatePicker

String

the date in Jira format used in date picker

11.09.2016

formatDateISO

String

the date in ISO 8601 'YYYY-MM-DD' format

2016-09-11

${

formatTime

}

String

the time

of current repeating occurrence

in Jira

time

format used when display dates

1:15 PM

${day}day of current repeating occurrence

formatRelative

String

the date and time relative to now

Tomorrow

day

Number

day as number

3

dayLong

String

day in 'DD' format

03

${week}week of current repeating occurrence36${month}month of current repeating occurrence

dayName

String

full day name

Monday

dayAbbr

String

short day name

Mon

week

Number

week number in year

36

month

Number

month as number

7

monthLong

String

month in 'MM' format

11${year}year of current repeating occurence in 'yyyy' format2016

Math operations on date attribute

Info

Available since 0.18.0 version

...

07

monthName

String

full month name

December

monthAbbr

String

short month name

Dec

year

Number

year number

2016

Operations on date object

On date object user can do math operations and modify final date value. For example user can add minutes, hours, days, weeks, months or set hour/minutes to exact value. See available operation below:

Deprecated variable paths/names

Versions before 0.18.0 use different patterns for variable paths/names. Please note that following paths/names will be removed in future versions and should not be used since 0.18.0 version:

...

Operation

Date object methods

Description

Sample usage

MODIFYING METHODS

withMinutes(<integerValue>)

modifies the date by setting specified number of minutes.

Info
Value

Integer value must be in the range [0,59]

${repeating

$repeating.date.withMinutes(0)

.formatDateTime}

withHours(<integerValue>)

modifies the date by setting specified number of hours.

Info
Value

Integer value must be in the range [0,23]

${repeating

$repeating.date.withHours(12)

withDay(<integerValue>)

modifies the date by setting specified day of month.

Info

Integer value must be in the range [1,31]

$repeating.date.withDay(20)

withMonth(<integerValue>)

modifies the date by setting specified month of year.

Info

Integer value must be in the range [1,12]

$repeating.date.withMonth(10)

.formatDateTime}

withYear(<integerValue>)

modifies the date by setting specified year.

$repeating.date.withYear(2024)

addMinutes(<integerValue>)

modifies the date by adding specified number of minutes

${repeating

$repeating.date.addMinutes(15)

.formatDateTime}

addMinutesStrict(<integerValue>)

modifies the date by adding specified number of minutes with respecting non-working days

$repeating.date.addMinutesStrict(15)

addHours(<integerValue>)

modifies the date by adding specified number of hours

${repeating

$repeating.date.addHours(2)

.formatTime}

addHoursStrict(<integerValue>)

modifies the date by adding specified number of hours with respecting non-working days

$repeating.date.addHoursStrict(2)

addDays(<integerValue>)

modifies the date by adding specified number of days

${repeating

$repeating.date.addDays(2)

.formatDateTime}

addDaysStrict(<integerValue>)

modifies the date by adding specified number of days with respecting non-working days

$repeating.date.addDaysStrict(2)

addWeeks(<integerValue>)

modifies the date by adding specified number of weeks

${repeating

$repeating.date.addWeeks(1)

addWeeksStrict(<integerValue>)

.formatDateTime}

modifies the date by adding specified number of weeks with respecting non-working days

$repeating.date.addWeeksStrict(1)

addMonths(<integerValue>)

modifies the date by adding specified number of months

${repeating

$repeating.date.addMonths(15)

addMonthsStrict(<integerValue>)

.formatDate}

modifies the date by adding specified number of months with respecting non-working days

$repeating.date.addMonthsStrict(15)

addYears(<integerValue>)

modifies the date by adding specified number of years

${repeating

$repeating.date.

addYers

addYears(1)

.formatDateTime}

...

addYearsStrict(<integerValue>)

modifies the date by adding specified number of years with respecting non-working days

$repeating.date.addYearsStrict(1)

COMPARISON METHODS

isBefore(<dateObject | dateString>)

check if the date is before given date

Info

Parameter can be other date object or date / date time in ISO format YYYY-MM-DD'T'hh:mm:ss

$repeating.date.isBefore($sourceIssue.dueDate)

isAfter(<dateObject | dateString>)

check if the date is after given date

Info

Parameter can be other date object or date / date time in ISO format YYYY-MM-DD'T'hh:mm:ss

$repeating.date.isAfter('2018-09-13T13:30:00')

isEqual(<dateObject | dateString>)

check if the date is equal to given date

Info

Parameter can be other date object or date / date time in ISO format YYYY-MM-DD'T'hh:mm:ss

$repeating.date.isEqual('2018-09-13')

DISPLAY METHODS

format(<formatInString>)

print the date and time in the given Joda DateTImeFormat

$repeating.date.format("yyyy-dd-MM"')

Differences between strict and non-strict date modifications

Below is quick and simple comparison how strict mode with respecting non-working days differ from simple date modifications. 

Repeating date is: 19/Sep/18 2:45 PM
Non-working days are: 20/Sep/18 and 21/Sep/18

Code Block
languagenone
$repeating.date.addDays(5) vs $repeating.date.addDaysStrict(5)
24/Sep/18 2:45 PM vs 26/Sep/18 2:45 PM

$repeating.date.addMinutes(25) vs $repeating.date.addMinutesStrict(25)
19/Sep/18 3:10 PM vs 19/Sep/18 3:10 PM

$repeating.date.addMinutes(4335) vs $repeating.date.addMinutesStrict(4335) (4335 minutes is equal to 3 days 15 minutes)
22/Sep/18 3:00 PM vs 24/Sep/18 3:00 PM

$repeating.date.addHours(10) vs $repeating.date.addHoursStrict(10)
20/Sep/18 12:45 AM vs 22/Sep/18 12:45 AM

$repeating.date.addHours(76) vs $repeating.date.addHoursStrict(76) (76 hours is equal to 3 days 4 hours)
22/Sep/18 6:45 PM vs 24/Sep/18 6:45 PM

$repeating.date.addHours(82) vs $repeating.date.addHoursStrict(82) (82 hours is equal to 3 days 10 hours)
23/Sep/18 12:45 AM vs 25/Sep/18 12:45 AM

$repeating.date.addMonths(2) vs $repeating.date.addMonthsStrict(2)
19/Nov/18 1:45 PM vs 21/Nov/18 1:45 PM

$repeating.date.addYears(1) vs $repeating.date.addYearsStrict(1)
19/Sep/19 2:45 PM vs 21/Sep/19 2:45 PM

Sample date comparisons in velocity templates

Velocity expression

Sample value

$repeating.date.isAfter('2018-09-13T13:30:00')

true

$repeating.date.isEqual('2018-09-13')

true

$repeating.date.isAfter($sourceIssue.dueDate)

false

$sourceIssue.updatedDate.month < 8

false

#if($repeating.date.month > 4)Some value#{else}other value#end

Some value