From ba0f9bfd98446019d73d299dd2e65ddec2ee5b27 Mon Sep 17 00:00:00 2001 From: liaoyulong Date: Mon, 27 Oct 2025 18:20:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=9A=E7=94=A8=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/time.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/time.go b/tools/time.go index 8ffe862..bad3ff1 100644 --- a/tools/time.go +++ b/tools/time.go @@ -152,3 +152,8 @@ func (m *timeMod) CheckIsBeRwd(createdTime, lastRwdTime time.Time, _now ...time. // 如果是,则说明还没领过,可以领取 return lastRwdTime.Before(refreshToday) } + +// 获取指定时间的本月最后一刻 +func (m *timeMod) EndOfMonth(t time.Time) time.Time { + return time.Date(t.Year(), t.Month()+1, 1, 0, 0, 0, 0, t.Location()).Add(-time.Second) +}