mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
修复汉字转换周天错误
This commit is contained in:
parent
8801b8659b
commit
32eed9a4d8
@ -151,6 +151,9 @@ func chineseNum2Int(rs []rune) int8 {
|
|||||||
|
|
||||||
//处理单个字符的映射0~10
|
//处理单个字符的映射0~10
|
||||||
func chineseChar2Int(c rune) int {
|
func chineseChar2Int(c rune) int {
|
||||||
|
if c == rune('日') || c == rune('天') { //周日/周天
|
||||||
|
return 7
|
||||||
|
} else {
|
||||||
match := []rune("零一二三四五六七八九十")
|
match := []rune("零一二三四五六七八九十")
|
||||||
for i, m := range match {
|
for i, m := range match {
|
||||||
if c == m {
|
if c == m {
|
||||||
@ -158,6 +161,7 @@ func chineseChar2Int(c rune) int {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//@全体成员
|
//@全体成员
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user