feat: add some feature

This commit is contained in:
2024-08-30 14:24:46 +08:00
parent e48f899f9e
commit bf75cfad38
21 files changed
+333 -24

No files matched your search

@@ -0,0 +1,20 @@
/*
* Copyright © 2024 RTAkland
* Author: RTAkland
* Date: 2024/8/29
*/
package cn.rtast.fancybot.util
import java.time.Instant
import java.time.LocalDate
import java.time.ZoneId
fun Long.isSameDay(other: Long): Boolean {
val currentDate = LocalDate.now()
val dateToCompare = Instant.ofEpochSecond(other)
.atZone(ZoneId.systemDefault())
.toLocalDate()
return currentDate == dateToCompare
}