Versions Compared

Key

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


...


...

Available since 1.2.0 version

date format
Date object propertyTypeDescriptionSample value
formatDateTimeStringthe date and time in Jira datetime formatformat used when display dates11/sep/16 1:15 PM
formatDateformatDateTimePickerStringthe date and time in Jira format used in date picker11.09.2016 13:15
formatDateStringthe date in Jira Jira format used when display dates11/sep/16
formatDatePickerStringthe date in Jira format used in date picker11.09.2016
formatDateISOStringthe date in ISO 8601 'YYYY-MM-DD' format2016-09-11
formatTimeStringthe time in Jira time format used when display dates1:15 PM
formatRelativeStringthe date and time relative to nowTomorrow
dayNumberday as number3
dayLongStringday in 'DD' format03
dayNameStringfull day nameMonday
dayAbbrStringshort day nameMon
weekNumberweek number in year36
monthNumbermonth as number7
monthLongStringmonth in 'MM' format07
monthNameStringfull month nameDecember
monthAbbrStringshort month nameDec
yearNumberyear number2016

Operations on date object

...

Date object methodsDescriptionSample usage
MODIFYING METHODS
withMinutes(<integerValue>)

modifies the date by setting specified number of minutes.

Info

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


$repeating.date.withMinutes(0)
withHours(<integerValue>)

modifies the date by setting specified number of hours.

Info

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


$repeating.date.withHours(12)
addMinutes(<integerValue>)modifies the date by adding specified number of minutes$repeating.date.addMinutes(15)
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.date.addHours(2)
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.date.addDays(2)
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.date.addWeeks(1)
addWeeksStrict(<integerValue>)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.date.addMonths(15)
addMonthsStrict(<integerValue>)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.date.addYears(1)
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.isEqal($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

...

Velocity expressionSample 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 < 8false
#if($repeating.date.month > 4)Some value#{else}other value#endSome value