From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点
---
HMI.Util/DateUtil.cs | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/HMI.Util/DateUtil.cs b/HMI.Util/DateUtil.cs
new file mode 100644
index 0000000..2381a39
--- /dev/null
+++ b/HMI.Util/DateUtil.cs
@@ -0,0 +1,35 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HMI.Util
+{
+ public class DateUtil
+ {
+ public static void GetDayTime(out DateTime start, out DateTime end)
+ {
+ DateTime currentTime = DateTime.Now;
+ start = new DateTime(currentTime.Year, currentTime.Month, currentTime.Day, 0, 0, 0);
+ end = new DateTime(currentTime.Year, currentTime.Month, currentTime.Day, 23, 59, 59);
+ }
+
+ public static void GetWeekTime(out DateTime start, out DateTime end)
+ {
+ DateTime currentTime = DateTime.Now;
+ start = currentTime.AddDays(1 - 7);
+ start = new DateTime(start.Year, start.Month, start.Day, 0, 0, 0);
+ end = currentTime.AddDays(7 - 7);
+ end = new DateTime(end.Year, end.Month, end.Day, 23, 59, 59);
+ }
+
+ public static void GetMonthTime(out DateTime start, out DateTime end)
+ {
+ DateTime currentTime = DateTime.Now;
+ start = new DateTime(currentTime.Year, currentTime.Month, 1, 0, 0, 0);
+ end = start.AddMonths(1).AddDays(-1);
+ end = new DateTime(end.Year, end.Month, end.Day, 23, 59, 59);
+ }
+ }
+}
--
Gitblit v1.9.1