Date 関数と Time 関数です。
現バージョン
現在の日時を参照するスマート値
{{now}}
{{now.plusDays(7).jqlDate}}
日付形式
例:
{{now.jiraDate}}
{{now.format("dd/MM/yyyy")}}
{{now.shortDate}}
| 形式 | 1979 年 11 月 1 日、木曜日、6:23:12 AM EST |
|---|---|
| 初期設定 (指定なし) | 1979 年 11 月 1 日、6:23:12 AM |
| jiraDate | 1979-11-01 |
| jiraDateTime | 1979-11-01T06:23:12.0-0500 |
| jqlDate | 1979-11-01 |
| jqlDateTime | 1979-11-01 06:23 |
| shortDate | 11/1/79 |
| shortTime | 6:23 AM |
| shortDateTime | 11/1/79 6:23 AM |
| mediumDate | 1979 年 11 月 1 日 |
| mediumTime | 6:23:12 AM |
| mediumDateTime | 1979 年 11 月 1 日、6:23:12 AM |
| longDate | 1979 年 11 月 1 日 |
| longTime | 6:23:12 AM EST |
| longDateTime | 1979 年 11 月 1 日、6:23:12 AM EST |
| fullDate | Thursday, November 1, 1979 |
| fullTime | 6:23:12 AM EST |
| fullDateTime | 1979 年 11 月 1 日、木曜日、6:23:12 AM EST |
| format("<pattern>") 例: format("dd/MM/yyyy") パターン構文については Java のドキュメントをご参照ください。 | 01/11/1979 |
diff(date)
{{now.diff(issue.created).days}}
利用可能なユニット:
- millis
- 秒
- minutes
- 時
- days
- weeks
- 月
- 年
- businessDays
- prettyPrint
- abs
「prettyPrint」は単語間の差分を表示します。例: 2 days 3 hours
isAfter(date)
{{now.isAfter(issue.created)}} (true または false を返す)
isBefore(date)
{{now.isBefore(issue.created)}} (true または false を返す)
isEquals(date)
{{now.isEquals(now)}} (true または false を返す)
compareTo(date)
{{now.compareTo(issue.created)}} (数値を返す)
{{issue.created.compareTo(now)}} (数値を返す){{now.compareTo(now)}} (0 を返す)
plusDays/minusDays
{{now.plusDays(1)}}{{now.minusDays(1)}}
plusHours/minusHours
{{now.plusHours(1)}}{{now.minusHours(1)}}
plusWeeks/minusWeeks
{{now.plusWeeks(1)}}{{now.minusWeeks(1)}}
plusMillis/minusMillis
{{now.plusMillis(1)}}{{now.minusMillis(1)}}
plusMinutes/minusMinutes
{{now.plusMinutes(1)}}{{now.minusMinutes(1)}}
plusMonths/minusMonths
{{now.plusMonths(1)}}{{now.minusMonths(1)}}
plusSeconds/minusSeconds
{{now.plusSeconds(1)}}{{now.minusSeconds(1)}}
plusYears/minusYears
{{now.plusYears(1)}}{{now.minusYears(1)}}
plusBusinessDays/minusBusinessDays
営業日は月~金の午前 9 時 ~ 午後 6 時とします。
{{now.plusBusinessDays(1)}}{{now.minusBusinessDays(1)}}
toBusinessDay/toBusinessDayBackwards
営業日は月~金の午前 9 時 ~ 午後 6 時とします。
{{toBusinessDay}}{{toBusinessDayBackwards}}
setTimeZone/convertToTimeZone
{{convertToTimeZone("Australia/Sydney")}}
時刻を新しいタイムゾーンの時刻に変換します。たとえば、UTC 午前 7 時はシドニー時間の午後 5 時になります。これは、特定のタイムゾーンで日付を表示、または特定のタイムゾーンの時間に基づいて計算を実行する際に役立ちます。
{{setTimeZone("Australia/Sydney")}}
タイムゾーンを変更しますが、同じ日時を維持します。例: UTC 午前 7 時をシドニー時間午前 7 時に変換
注: タイムゾーンは {area}/{city} フォーマットで指定する必要があります (例: America/Los_Angeles)。
日付から日時への変換
次の関数によって、日付を時間コンポーネントを含む日付に変換できます。
{{now.toStartOfDay}}
{{now.toCurrentTime}}
{{now.toDateTimeAtStartOfDay}}
{{now.toDateTimeAtStartOfDay(timezone)}}
{{now.toDateTimeAtCurrentTime}}
{{now.toDateTimeAtCurrentTime(timezone)}}
withDayOfMonth
{{now.withDayOfMonth(15)}}
withNextDayOfWeek
日付を次の当該曜日に設定します。
すでにその曜日である場合は、翌週の曜日を返します。
使用できる値は、MON、TUE、WED、THU、FRI、SAT、SUN です。
{{now.withNextDayOfWeek("TUE")}} は次の火曜日を返します。{{now.withNextDayOfWeek("MON").withHour(14).withMinute(0)}} は次の月曜日の午後 2 時を返します。
withHour
{{now.withHour(20)}}
withMillis
{{now.withMillis(500)}}
withMinute
{{now.withMinute(59)}}
withMonth
{{now.withMonth(10)}}
withSecond
{{now.withSecond(0)}}
withYear
{{now.withYear(1979)}}
withDayOfYear
{{now.withDayOfYear(355)}}
日付の曜日コンポーネントを設定します
{{now.endOfMonth}}
{{now.startOfMonth}}
{{now.firstBusinessDayOfMonth}}
{{now.lastBusinessDayOfMonth}}
// Parameters: day of week (1-7)
{{now.firstOfTheMonth(1)}}
{{now.lastOfTheMonth(1)}}
// Parameters: nth of month (1-5), day of week (1-7)
{{now.ofTheMonth(2, 1)}}
属性
| 属性 |
|---|
| millis |
| second |
| 分 |
| 時間 |
| 日 |
| monthOfYear |
| 年 |
| dayOfYear |
| dayOfWeek |
| dayOfWeekName |
| dayOfWeekShortName |
weekOfYear |
| weekOfYearIso |
| zoneId |
| toDays |
| isLeapYear |
| lengthOfMonth |
| lengthOfYear |
| timeZoneShort |
| timeZoneFull |
| timeZoneNarrow |
| offsetShort |
| offsetFull |
| offsetNarrow |