---
title: date package
description: The date package provides date and time constants and functions.
url: https://docs.influxdata.com/flux/v0/stdlib/date/
estimated_tokens: 1907
product: Flux
version: v0
---

# date package

-   Flux 0.37.0+
-   View InfluxDB support

The `date` package provides date and time constants and functions. Import the `date` package:

```js
import "date"
```

## Constants

```js
date.April = 4
date.August = 8
date.December = 12
date.February = 2
date.Friday = 5
date.January = 1
date.July = 7
date.June = 6
date.March = 3
date.May = 5
date.Monday = 1
date.November = 11
date.October = 10
date.Saturday = 6
date.September = 9
date.Sunday = 0
date.Thursday = 4
date.Tuesday = 2
date.Wednesday = 3
```

-   **date.April** is a constant that represents the month of April.
-   **date.August** is a constant that represents the month of August.
-   **date.December** is a constant that represents the month of December.
-   **date.February** is a constant that represents the month of February.
-   **date.Friday** is a constant that represents Friday as a day of the week.
-   **date.January** is a constant that represents the month of January.
-   **date.July** is a constant that represents the month of July.
-   **date.June** is a constant that represents the month of June.
-   **date.March** is a constant that represents the month of March.
-   **date.May** is a constant that represents the month of May.
-   **date.Monday** is a constant that represents Monday as a day of the week.
-   **date.November** is a constant that represents the month of November.
-   **date.October** is a constant that represents the month of October.
-   **date.Saturday** is a constant that represents Saturday as a day of the week.
-   **date.September** is a constant that represents the month of September.
-   **date.Sunday** is a constant that represents Sunday as a day of the week.
-   **date.Thursday** is a constant that represents Thursday as a day of the week.
-   **date.Tuesday** is a constant that represents Tuesday as a day of the week.
-   **date.Wednesday** is a constant that represents Wednesday as a day of the week.

## Functions

-   [date.add()](/flux/v0/stdlib/date/add/)
-   [date.hour()](/flux/v0/stdlib/date/hour/)
-   [date.microsecond()](/flux/v0/stdlib/date/microsecond/)
-   [date.millisecond()](/flux/v0/stdlib/date/millisecond/)
-   [date.minute()](/flux/v0/stdlib/date/minute/)
-   [date.month()](/flux/v0/stdlib/date/month/)
-   [date.monthDay()](/flux/v0/stdlib/date/monthday/)
-   [date.nanosecond()](/flux/v0/stdlib/date/nanosecond/)
-   [date.quarter()](/flux/v0/stdlib/date/quarter/)
-   [date.scale()](/flux/v0/stdlib/date/scale/)
-   [date.second()](/flux/v0/stdlib/date/second/)
-   [date.sub()](/flux/v0/stdlib/date/sub/)
-   [date.time()](/flux/v0/stdlib/date/time/)
-   [date.truncate()](/flux/v0/stdlib/date/truncate/)
-   [date.week()](/flux/v0/stdlib/date/week/)
-   [date.weekDay()](/flux/v0/stdlib/date/weekday/)
-   [date.year()](/flux/v0/stdlib/date/year/)
-   [date.yearDay()](/flux/v0/stdlib/date/yearday/)

## Packages

### [boundaries package](/flux/v0/stdlib/date/boundaries/)

The `boundaries` package provides operators for finding the boundaries around certain days, months, and weeks.

[date/time](/flux/v0/tags/date/time/)
