---
schema_version: "1"
id: c8e0eff04f6aa7e9a207623eac04f810e140d9e9cc8d6f6e0d986de33c17bac0
title: isLeapYear
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.7/dw-core-functions-isleapyear.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.7/dw-core-functions-isleapyear
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 1bd2d07d8ce5cbe97c12147486e2ed8dc2e8e88dc7503573d0ec7d258b8ac82a
description: MuleSoft Documentation Site
release: "2.7"
latest: false
---
# isLeapYear

## [](#isleapyear1)isLeapYear(dateTime: DateTime): Boolean

うるう年の日付を受け取った場合は ​`true`​、それ以外の場合は ​`false`​ を返します。

このバージョンの ​`leapYear`​ は、​`DateTime`​ (日時) 型で動作します。その他のバージョンは、DataWeave でサポートされる他の日付と時刻の形式で動作します。

### [](#パラメーター)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>dateTime</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">評価する ​<code>DateTime</code>​ 値。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、入力がうるう年かどうかを示します。

#### [](#ソース)ソース

```DataWeave
%dw 2.0
output application/json
---
[ isLeapYear(|2016-10-01T23:57:59|), isLeapYear(|2017-10-01T23:57:59|) ]
```

#### [](#出力)出力

```JSON
[ true, false ]
```

## [](#isleapyear2)isLeapYear(date: Date): Boolean

入力 ​`Date`​ (日付) がうるう年の場合は ​`true`​、それ以外の場合は 'false' を返します。

### [](#パラメーター-2)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>date</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">評価する ​<code>Date</code>​ 値。</p></td>
</tr>
</tbody>
</table>

### [](#例-2)例

次の例では、入力がうるう年かどうかを示します。

#### [](#ソース-2)ソース

```DataWeave
%dw 2.0
output application/json
---
[ isLeapYear(|2016-10-01|), isLeapYear(|2017-10-01|) ]
```

#### [](#出力-2)出力

```JSON
[ true, false ]
```

## [](#isleapyear3)isLeapYear(datetime: LocalDateTime): Boolean

入力ローカル日時がうるう年の場合は ​`true`​、それ以外の場合は 'false' を返します。

### [](#パラメーター-3)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>datetime</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">評価する ​<code>LocalDateTime</code>​ 値。</p></td>
</tr>
</tbody>
</table>

### [](#例-3)例

次の例では、入力がうるう年かどうかを示します。​`map`​ 関数を使用して、その ​`LocalDateTime`​ 値の配列を反復処理し、値に ​`isLeapYear`​ を適用して結果を配列で返します。

#### [](#ソース-3)ソース

```DataWeave
%dw 2.0
output application/json
---
[ |2016-10-01T23:57:59-03:00|, |2016-10-01T23:57:59Z| ] map isLeapYear($)
```

#### [](#出力-3)出力

```JSON
[ true, true ]
```