added functions for date package

pull/335/head
Scott Anderson 2019-07-17 16:10:16 -06:00
parent c5fb00e8c1
commit 46a77d15cd
8 changed files with 217 additions and 1 deletions

View File

@ -0,0 +1,31 @@
---
title: date.hour() function
description: >
The `date.hour()` function returns the hour within the day the specified time falls in.
Results are in the range `[0-23]`.
menu:
v2_0_ref:
name: date.hour
parent: Date
weight: 301
---
The `date.hour()` function returns the hour within the day a specified time falls in.
Results are in the range `[0-23]`.
_**Function type:** Transformation_
```js
import "date"
date.functionName(t: 2019-07-17T12:05:21.012Z)
// Returns 12
```
## Parameters
### t
The time to operate on.
_**Data type:** Time_

View File

@ -0,0 +1,31 @@
---
title: date.minute() function
description: >
The `date.minute()` function returns the minute within the hour the specified time falls in.
Results are in the range in the range `[0-59]`.
menu:
v2_0_ref:
name: date.minute
parent: Date
weight: 301
---
The `date.minute()` function returns the minute within the hour a specified time falls in.
Results are in the range in the range `[0-59]`.
_**Function type:** Transformation_
```js
import "date"
date.minute(t: 2019-07-17T12:05:21.012Z)
// Returns 21
```
## Parameters
### t
The time to operate on.
_**Data type:** Time_

View File

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

View File

@ -0,0 +1,31 @@
---
title: date.monthDay() function
description: >
The `date.monthDay()` function returns the day of the month for the specified time.
Results are in the range `[1-31]`.
menu:
v2_0_ref:
name: date.monthDay
parent: Date
weight: 301
---
The `date.monthDay()` function returns the day of the month for the specified time.
Results are in the range `[1-31]`.
_**Function type:** Transformation_
```js
import "date"
date.monthDay(t: 2019-07-17T12:05:21.012Z)
// Returns 17
```
## Parameters
### t
The time to operate on.
_**Data type:** Time_

View File

@ -0,0 +1,31 @@
---
title: date.second() function
description: >
The `date.second()` function returns the second within the minute the specified time falls in.
Results are in the range `[0, 59]`.
menu:
v2_0_ref:
name: date.second
parent: Date
weight: 301
---
The `date.second()` function returns the second within the minute the specified time falls in.
Results are in the range `[0, 59]`.
_**Function type:** Transformation_
```js
import "date"
date.second(t: 2019-07-17T12:05:21.012Z)
// Returns 21
```
## Parameters
### t
The time to operate on.
_**Data type:** Time_

View File

@ -0,0 +1,31 @@
---
title: date.weekDay() function
description: >
The `date.weekDay()` function returns the day of the week the specified time falls in.
Results are in the range `[0, 6]`.
menu:
v2_0_ref:
name: date.weekDay
parent: Date
weight: 301
---
The `date.weekDay()` function returns the day of the week the specified time falls in.
Results are in the range `[0, 6]`.
_**Function type:** Transformation_
```js
import "date"
date.weekDay(t: 2019-07-17T12:05:21.012Z)
// Returns 3
```
## Parameters
### t
The time to operate on.
_**Data type:** Time_

View File

@ -0,0 +1,31 @@
---
title: date.yearDay() function
description: >
The `date.yearDay()` function returns the day of the year the specified time falls in.
Results are in the range `[1, 365]` for non-leap years, and `[1, 366]` in leap years.
menu:
v2_0_ref:
name: date.yearDay
parent: Date
weight: 301
---
The `date.yearDay()` function returns the day of the year the specified time falls in.
Results are in the range `[1, 365]` for non-leap years, and `[1, 366]` in leap years.
_**Function type:** Transformation_
```js
import "date"
date.yearDay(t: 2019-07-17T12:05:21.012Z)
// Returns 198
```
## Parameters
### t
The time to operate on.
_**Data type:** Time_

@ -1 +0,0 @@
Subproject commit fb6e0a3224f5e84a45d7c654e8a870bcaaddaadc