test
This commit is contained in:
parent
8d136bd051
commit
ec2f4be604
35
def.go
35
def.go
@ -61,6 +61,41 @@ const (
|
||||
SQLJobWorkers = 3
|
||||
)
|
||||
|
||||
var (
|
||||
chatWarsMonth = map[string]int{
|
||||
"Wintar": 1,
|
||||
"Hornung": 2,
|
||||
"Lenzin": 3,
|
||||
"Ōstar": 4,
|
||||
"Winni": 5,
|
||||
"Brāh": 6,
|
||||
"Hewi": 7,
|
||||
"Aran": 8,
|
||||
"Witu": 9,
|
||||
"Wīndume": 10,
|
||||
"Herbist": 11,
|
||||
"Hailag": 12}
|
||||
|
||||
chatWarsDaysSpecial = map[int]map[int]int{
|
||||
2:{1060:29},
|
||||
4:{1060:29}
|
||||
}
|
||||
|
||||
chatWarsDays = map[int]int{
|
||||
1: 31,
|
||||
2: 28,
|
||||
3: 31,
|
||||
4: 30,
|
||||
5: 31,
|
||||
6: 30,
|
||||
7: 31,
|
||||
8: 31,
|
||||
9: 30,
|
||||
10: 31,
|
||||
11: 30,
|
||||
12: 31}
|
||||
)
|
||||
|
||||
func fromChatWarsDate(d string) (t time.Time, err error) {
|
||||
r := regexp.MustCompile(`(?P<Day>[0-9]{2}) (?P<Month>(Wintar|Hornung|Lenzin|Ōstar|Winni|Brāh|Hewi|Aran|Witu|Wīndume|Herbist|Hailag)) (?P<Year>[0-9]{4})( (?P<Hour>[0-9]{2}):(?P<Minute>[0-9]{2})){0,1}`)
|
||||
if r.FindStringSubmatch(d) != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user