removed integer support from timeable function parameters
parent
250a736d32
commit
abb0e0d8cf
|
@ -31,9 +31,8 @@ date.hour(t: 2019-07-17T12:05:21.012Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.hour(t: -8h)
|
|||
|
||||
// Returns 4
|
||||
```
|
||||
|
||||
##### Return the hour of a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.hour(t: 1581423663293534940)
|
||||
|
||||
// Returns 12
|
||||
```
|
||||
|
|
|
@ -31,9 +31,8 @@ date.microsecond(t: 2019-07-17T12:05:21.012934584Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.microsecond(t: -1890us)
|
|||
|
||||
// Returns 291644
|
||||
```
|
||||
|
||||
##### Return the microsecond of a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.microsecond(t: 1581423663293534940)
|
||||
|
||||
// Returns 293534
|
||||
```
|
||||
|
|
|
@ -31,9 +31,8 @@ date.millisecond(t: 2019-07-17T12:05:21.012934584Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.millisecond(t: -150ms)
|
|||
|
||||
// Returns 143
|
||||
```
|
||||
|
||||
##### Return the millisecond of a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.millisecond(t: 1581423663293534940)
|
||||
|
||||
// Returns 293
|
||||
```
|
||||
|
|
|
@ -31,9 +31,8 @@ date.minute(t: 2019-07-17T12:05:21.012Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.minute(t: -45m)
|
|||
|
||||
// Returns 36
|
||||
```
|
||||
|
||||
##### Return the minute of a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.minute(t: 1581423663293534940)
|
||||
|
||||
// Returns 21
|
||||
```
|
||||
|
|
|
@ -31,9 +31,8 @@ date.month(t: 2019-07-17T12:05:21.012Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.month(t: -3mo)
|
|||
|
||||
// Returns 11
|
||||
```
|
||||
|
||||
##### Return the month of a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.month(t: 1581423663293534940)
|
||||
|
||||
// Returns 2
|
||||
```
|
||||
|
|
|
@ -31,9 +31,8 @@ date.monthDay(t: 2019-07-17T12:05:21.012Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.monthDay(t: -8d)
|
|||
|
||||
// Returns 3
|
||||
```
|
||||
|
||||
##### Return the day of the month for a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.monthDay(t: 1581423663293534940)
|
||||
|
||||
// Returns 11
|
||||
```
|
||||
|
|
|
@ -31,9 +31,8 @@ date.nanosecond(t: 2019-07-17T12:05:21.012934584Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.nanosecond(t: -2111984ns)
|
|||
|
||||
// Returns 291422956
|
||||
```
|
||||
|
||||
##### Return the nanosecond for a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.nanosecond(t: 1581423663293534940)
|
||||
|
||||
// Returns 293534940Z
|
||||
```
|
||||
|
|
|
@ -31,9 +31,8 @@ date.quarter(t: 2019-07-17T12:05:21.012Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.quarter(t: -7mo)
|
|||
|
||||
// Returns 3
|
||||
```
|
||||
|
||||
##### Return the quarter for a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.quarter(t: 1581423663293534940)
|
||||
|
||||
// Returns 1
|
||||
```
|
||||
|
|
|
@ -31,9 +31,8 @@ date.second(t: 2019-07-17T12:05:21.012Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.second(t: -50s)
|
|||
|
||||
// Returns 13
|
||||
```
|
||||
|
||||
##### Return the second of a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.second(t: 1581423663293534940)
|
||||
|
||||
// Returns 3
|
||||
```
|
||||
|
|
|
@ -32,9 +32,8 @@ date.truncate(
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
### unit
|
||||
The unit of time to truncate to.
|
||||
|
@ -77,17 +76,3 @@ date.truncate(t: -1m, unit: 1m)
|
|||
date.truncate(t: -1h, unit: 1h)
|
||||
// Returns 2019-12-31T23:00:00.000000000Z
|
||||
```
|
||||
|
||||
##### Truncate time values using nanosecond Unix timestamps
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.truncate(t: 1559570341000000000, unit: 1s)
|
||||
// Returns 2019-06-03T13:59:01.000000000Z
|
||||
|
||||
date.truncate(t: 1559570341000000000, unit: 1m)
|
||||
// Returns 2019-06-03T13:59:00.000000000Z
|
||||
|
||||
date.truncate(t: 1559570341000000000, unit: 1h)
|
||||
// Returns 2019-06-03T13:00:00.000000000Z
|
||||
```
|
||||
|
|
|
@ -31,9 +31,8 @@ date.week(t: 2019-07-17T12:05:21.012Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.week(t: -12d)
|
|||
|
||||
// Returns 5
|
||||
```
|
||||
|
||||
##### Return the week of the year using a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.week(t: 1581423663293534940)
|
||||
|
||||
// Returns 7
|
||||
```
|
||||
|
|
|
@ -31,9 +31,8 @@ date.weekDay(t: 2019-07-17T12:05:21.012Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.weekDay(t: -84h)
|
|||
|
||||
// Returns 6
|
||||
```
|
||||
|
||||
##### Return the day of the week for a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.weekDay(t: 1581423663293534940)
|
||||
|
||||
// Returns 2
|
||||
```
|
||||
|
|
|
@ -29,9 +29,8 @@ date.year(t: 2019-07-17T12:05:21.012Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -54,12 +53,3 @@ date.year(t: -14y)
|
|||
|
||||
// Returns 2006
|
||||
```
|
||||
|
||||
##### Return the year for a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.year(t: 1581423663293534940)
|
||||
|
||||
// Returns 2020
|
||||
```
|
||||
|
|
|
@ -31,9 +31,8 @@ date.yearDay(t: 2019-07-17T12:05:21.012Z)
|
|||
The time to operate on.
|
||||
Use an absolute time, relative duration, or integer.
|
||||
Durations are relative to `now()`.
|
||||
Integers are **nanosecond** [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp).
|
||||
|
||||
_**Data type:** Time | Duration | Integer_
|
||||
_**Data type:** Time | Duration_
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -56,12 +55,3 @@ date.yearDay(t: -1mo)
|
|||
|
||||
// Returns 11
|
||||
```
|
||||
|
||||
##### Return the day of the year for a nanosecond Unix timestamp
|
||||
```js
|
||||
import "date"
|
||||
|
||||
date.yearDay(t: 1581423663293534940)
|
||||
|
||||
// Returns 42
|
||||
```
|
||||
|
|
|
@ -11,13 +11,19 @@ aliases:
|
|||
---
|
||||
|
||||
{{% note %}}
|
||||
The latest release of InfluxDB v2.0 beta includes **Flux v0.71.1**.
|
||||
The latest release of InfluxDB v2.0 beta includes **Flux v0.77.1**.
|
||||
Though newer versions of Flux may be available, they will not be included with
|
||||
InfluxDB until the next InfluxDB v2.0 release._
|
||||
{{% /note %}}
|
||||
|
||||
## v0.80.0 [2020-08-12]
|
||||
|
||||
{{% warn %}}
|
||||
#### Breaking change
|
||||
`range()` and `date` package functions no longer support integer values
|
||||
(nanosecond Unix timestamps).
|
||||
{{% /warn %}}
|
||||
|
||||
### Features
|
||||
- Add `nulls` parameter to `gen.tables()`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue