Correction des constantes du module datetime

This commit is contained in:
Benjamin VAUDOUR 2024-03-14 10:20:01 +01:00
parent fc9b29b7f3
commit f8c3668bda
1 changed files with 13 additions and 5 deletions

View File

@ -29,7 +29,9 @@ const (
MicrosecondPerSecond = MicrosecondPerMillisecond * MillisecondPerSecond
NanosecondPerMillisecond = NanosecondPerMicrosecond * MicrosecondPerMillisecond
NanosecondPerSecond = NanosecondPerMicrosecond * MicrosecondPerSecond
)
const (
// Unités supportées
NoUnit Unit = iota
Millisecond
@ -49,7 +51,9 @@ const (
maskUnit = 1<<bitsUnit - 1
maskValue = ^maskUnit
)
const (
// Précisions supportées
NoPrecision Precision = iota
PrecisionMillisecond
@ -77,7 +81,9 @@ const (
maskYear = ^(maskDay | maskMonth)
dateNil = date(0)
)
const (
// Mois
January = uint(1) + iota
February
@ -91,7 +97,9 @@ const (
October
November
December
)
const (
// Jours de la semaine
Sunday = uint(iota)
Monday
@ -108,12 +116,12 @@ var (
NoUnit: "",
Millisecond: "ms",
Second: "s",
Minute: "m",
Minute: "mn",
Hour: "h",
Day: "J",
Week: "S",
Month: "M",
Year: "A",
Day: "d",
Week: "w",
Month: "m",
Year: "y",
}
maskDate = map[string]date{