From 12916db6e7946a31f4fbc5c48a27e7769683b034 Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期一, 23 十月 2023 18:25:02 +0800 Subject: [PATCH] 10.23 --- cloud-server-other/src/main/java/com/dsh/other/util/DateComparisonExample.java | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/cloud-server-other/src/main/java/com/dsh/other/util/DateComparisonExample.java b/cloud-server-other/src/main/java/com/dsh/other/util/DateComparisonExample.java index 7c250b0..e48ab82 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/util/DateComparisonExample.java +++ b/cloud-server-other/src/main/java/com/dsh/other/util/DateComparisonExample.java @@ -11,14 +11,6 @@ import java.util.Date; public class DateComparisonExample { - public static void main(String[] args) { - String stringValue = "2023-10-18 00:20:00 - 2023-10-18 00:21:00"; - Date startDate = parseDate("2023-10-18 00:19:00"); - Date endDate = parseDate("2023-10-18 00:21:00"); - - boolean isBetween = isStringDateBetween(stringValue, startDate, endDate); - System.out.println("字符串时间是否在两个 Date 类型之间?" + isBetween); - } private static Date parseDate(String dateString) { SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm"); -- Gitblit v1.7.1