Flux date package

The Flux date package provides date and time constants and functions. Import the date package.

  1. import "date"

Date and time constants

That date package includes the following date and time constants.

Days of the week

Days of the week are represented as integers in the range [0-6].

  1. date.Sunday = 0
  2. date.Monday = 1
  3. date.Tuesday = 2
  4. date.Wednesday = 3
  5. date.Thursday = 4
  6. date.Friday = 5
  7. date.Saturday = 6

Months of the year

Months are represented as integers in the range [1-12].

  1. date.January = 1
  2. date.February = 2
  3. date.March = 3
  4. date.April = 4
  5. date.May = 5
  6. date.June = 6
  7. date.July = 7
  8. date.August = 8
  9. date.September = 9
  10. date.October = 10
  11. date.November = 11
  12. date.December = 12

Date and time functions

functions