diff --git a/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/Date.kt b/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/Date.kt index e1b8d20e..25ba7b9a 100644 --- a/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/Date.kt +++ b/common/src/iosMain/kotlin/net/dankito/utils/multiplatform/Date.kt @@ -67,4 +67,23 @@ actual class Date(val date: NSDate) { // cannot subclass NSDate as it's a class return components.day.toInt() } + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is Date) return false + + if (date != other.date) return false + + return true + } + + override fun hashCode(): Int { + return date.hashCode() + } + + override fun toString(): String { + return date.description ?: "Date(date=$date)" + } + + } \ No newline at end of file