From a9135de034588b3ad2bb1ab163fe6b5080ae0a30 Mon Sep 17 00:00:00 2001 From: 兔子 Date: Thu, 4 Mar 2021 12:25:04 +0800 Subject: [PATCH] bug fix:Chinese calendar display incorrect --- basic/calendar.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/basic/calendar.go b/basic/calendar.go index a28630f..361319a 100644 --- a/basic/calendar.go +++ b/basic/calendar.go @@ -301,7 +301,11 @@ func GetLunar(year, month, day int) (lmonth, lday int, leap bool, result string) if leap { result += "闰" } - result += strmonth[lmonth] + "月" + if lmonth == 1 { + result += "正月" + } else { + result += strmonth[lmonth] + "月" + } if lday == 20 { result += "二十" } else if lday == 10 {