fixed: zero at the beginning of dates/times, e.g. '05'

This commit is contained in:
evgeny.nefedkin 2018-01-10 16:59:39 +03:00
parent d520615e53
commit 6524c565e3
1 changed files with 16 additions and 16 deletions

View File

@ -75,27 +75,27 @@ var (
"2090": 2090, "2091": 2091, "2092": 2092, "2093": 2093, "2094": 2094, "2095": 2095, "2096": 2096, "2097": 2097, "2098": 2098, "2099": 2099, "2090": 2090, "2091": 2091, "2092": 2092, "2093": 2093, "2094": 2094, "2095": 2095, "2096": 2096, "2097": 2097, "2098": 2098, "2099": 2099,
} }
monthTokens = map[string]int{ monthTokens = map[string]int{
`1`: 1, `jan`: 1, `january`: 1, `1`: 1, `01`: 1, `jan`: 1, `january`: 1,
`2`: 2, `feb`: 2, `february`: 2, `2`: 2, `02`: 2, `feb`: 2, `february`: 2,
`3`: 3, `mar`: 3, `march`: 3, `3`: 3, `03`: 3, `mar`: 3, `march`: 3,
`4`: 4, `apr`: 4, `april`: 4, `4`: 4, `04`: 4, `apr`: 4, `april`: 4,
`5`: 5, `may`: 5, `5`: 5, `05`: 5, `may`: 5,
`6`: 6, `jun`: 6, `june`: 6, `6`: 6, `06`: 6, `jun`: 6, `june`: 6,
`7`: 7, `jul`: 7, `july`: 7, `7`: 7, `07`: 7, `jul`: 7, `july`: 7,
`8`: 8, `aug`: 8, `august`: 8, `8`: 8, `08`: 8, `aug`: 8, `august`: 8,
`9`: 9, `sep`: 9, `september`: 9, `9`: 9, `09`: 9, `sep`: 9, `september`: 9,
`10`: 10, `oct`: 10, `october`: 10, `10`: 10, `oct`: 10, `october`: 10,
`11`: 11, `nov`: 11, `november`: 11, `11`: 11, `nov`: 11, `november`: 11,
`12`: 12, `dec`: 12, `december`: 12, `12`: 12, `dec`: 12, `december`: 12,
} }
dowTokens = map[string]int{ dowTokens = map[string]int{
`0`: 0, `sun`: 0, `sunday`: 0, `0`: 0, `00`: 0, `sun`: 0, `sunday`: 0,
`1`: 1, `mon`: 1, `monday`: 1, `1`: 1, `01`: 1, `mon`: 1, `monday`: 1,
`2`: 2, `tue`: 2, `tuesday`: 2, `2`: 2, `02`: 2, `tue`: 2, `tuesday`: 2,
`3`: 3, `wed`: 3, `wednesday`: 3, `3`: 3, `03`: 3, `wed`: 3, `wednesday`: 3,
`4`: 4, `thu`: 4, `thursday`: 4, `4`: 4, `04`: 4, `thu`: 4, `thursday`: 4,
`5`: 5, `fri`: 5, `friday`: 5, `5`: 5, `05`: 5, `fri`: 5, `friday`: 5,
`6`: 6, `sat`: 6, `saturday`: 6, `6`: 6, `06`: 6, `sat`: 6, `saturday`: 6,
`7`: 0, `7`: 0,
} }
) )