# year {#year}

## Syntax {#syntax}

`year(X)`

## Arguments {#arguments}

**X** is a temporal scalar/vector.

## Details {#details}

Return the corresponding year\(s\). The data type of the result is INT.

## Examples {#examples}

```
year(2012.12.03);
// output: 2012

year(2012.12.03 2011.11.05);
// output: [2012,2011]

(2012.12.03).year();
// output: 2012
```

Related functions: [second](../s/second.md), [minute](../m/minute.md), [hour](../h/hour.md), [date](../d/date.md), [month](../m/month.md)

