868d6abb7 2025 -> 2026
63081666f Quellcode-Dateiköpfe: 2024 -> 2025.
c193e8288 Ical4j: Migrationskram... (alle Tests OK)
868d6abb7
2025 -> 2026868d6abb75cd191a892911ac8e45058932cf9074
diff --git a/projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/ICalDateUtils.kt b/projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/ICalDateUtils.kt
index 34b87655d..d0b70edcc 100644
--- a/projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/ICalDateUtils.kt
+++ b/projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/ICalDateUtils.kt
@@ -3,7 +3,7 @@
// Project ProjectForge Community Edition
// www.projectforge.org
//
-// Copyright (C) 2001-2025 Micromata GmbH, Deutschland (www.micromata.com)
+// Copyright (C) 2001-2026 Micromata GmbH, Deutschland (www.micromata.com)
//
// ProjectForge ist dual-lizenziert.
//
63081666f
Quellcode-Dateiköpfe: 2024 -> 2025.63081666f620fb87315f01b817e560e0b2f6a33a
diff --git a/projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/ICalDateUtils.kt b/projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/ICalDateUtils.kt
index ba2807658..34b87655d 100644
--- a/projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/ICalDateUtils.kt
+++ b/projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/ICalDateUtils.kt
@@ -3,7 +3,7 @@
// Project ProjectForge Community Edition
// www.projectforge.org
//
-// Copyright (C) 2001-2024 Micromata GmbH, Deutschland (www.micromata.com)
+// Copyright (C) 2001-2025 Micromata GmbH, Deutschland (www.micromata.com)
//
// ProjectForge ist dual-lizenziert.
//
c193e8288
Ical4j: Migrationskram... (alle Tests OK)c193e8288c03be35a08171e2319957a6080381b9
diff --git a/projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/ICalDateUtils.kt b/projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/ICalDateUtils.kt
new file mode 100644
index 000000000..ba2807658
--- /dev/null
+++ b/projectforge-business/src/main/kotlin/org/projectforge/business/teamcal/ical/ICalDateUtils.kt
@@ -0,0 +1,44 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// Project ProjectForge Community Edition
+// www.projectforge.org
+//
+// Copyright (C) 2001-2024 Micromata GmbH, Deutschland (www.micromata.com)
+//
+// ProjectForge ist dual-lizenziert.
+//
+// Diese Community-Edition ist freie Software; Sie können es weiterverteilen und/oder
+// modifizieren unter den Bedingungen der GNU General Public License, wie veröffentlicht
+// von der Free Software Foundation; Version 3 der Lizenz.
+//
+// Diese Community-Edition wird in der Hoffnung verteilt, dass sie nützlich sein wird,
+// aber OHNE JEDE GEWÄHRLEISTUNG; ohne sogar die stillschweigende Garantie der
+// MARKTGÄNGIGKEIT oder EIGNUNG FÜR EINEN BESTIMMTEN ZWECK. Siehe die GNU General
+// Public License für weitere Details.
+//
+// Sie sollten eine Kopie der GNU General Public License zusammen mit
+// diesem Programm erhalten haben; wenn nicht, siehe http://www.gnu.org/licenses/.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+package org.projectforge.business.teamcal.ical
+
+import java.time.LocalDate
+import java.time.LocalDateTime
+import java.time.ZonedDateTime
+import java.time.temporal.Temporal
+
+object ICalDateUtils {
+ fun extractLocalDate(date: Temporal): LocalDate {
+ return when (date) {
+ is ZonedDateTime -> date.toLocalDate()
+ is LocalDateTime -> date.toLocalDate()
+ is LocalDate -> date
+ else -> throw IllegalArgumentException("Nicht unterstützter Temporal-Typ: ${date::class}")
+ }
+ }
+
+ fun isSameDay(date1: Temporal, date2: Temporal): Boolean {
+ return extractLocalDate(date1) == extractLocalDate(date2)
+ }
+}