docs-v2/content/v2.0/reference/flux/language/built-ins/time-constants.md

1.2 KiB

title description menu weight
Time constants Flux provides built-in time constants for days of the week and months of the year.
v2_0_ref
name parent
Time constants Built-ins
301

{{% note %}} This document is a living document and may not represent the current implementation of Flux. Any section that is not currently implemented is commented with a [IMPL#XXX] where XXX is an issue number tracking discussion and progress towards implementation. {{% /note %}}

Days of the week

Days of the week are represented as integers in the range [0-6]. The following builtin values are defined:

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

{{% note %}} IMPL#153 Add Days of the Week constants {{% /note %}}

Months of the year

Months are represented as integers in the range [1-12]. The following builtin values are defined:

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

{{% note %}} IMPL#154 Add Months of the Year constants {{% /note %}}