added date.year function

pull/349/head
Scott Anderson 2019-08-05 13:21:51 -06:00
parent 22bcd1c951
commit a2c9de850a
1 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,29 @@
---
title: date.year() function
description: >
The `date.year()` function returns the year of a specified time.
menu:
v2_0_ref:
name: date.year
parent: Date
weight: 301
---
The `date.year()` function returns the year of a specified time.
_**Function type:** Transformation_
```js
import "date"
date.year(t: 2019-07-17T12:05:21.012Z)
// Returns 2019
```
## Parameters
### t
The time to operate on.
_**Data type:** Time_