added date.year function
parent
22bcd1c951
commit
a2c9de850a
|
@ -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_
|
Loading…
Reference in New Issue