feat: add image bed command
This commit is contained in:
31 files changed
+113
-63
No files matched your search
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright © 2024 RTAkland
|
||||
* Author: RTAkland
|
||||
* Date: 2024/8/29
|
||||
*/
|
||||
|
||||
|
||||
package cn.rtast.fancybot.util.misc
|
||||
|
||||
import java.time.Instant
|
||||
import java.time.ZoneId
|
||||
|
||||
fun Long.isSameDay(timestamp2: Long): Boolean {
|
||||
val zoneId = ZoneId.of("Asia/Shanghai")
|
||||
val date1 = Instant.ofEpochSecond(this).atZone(zoneId).toLocalDate()
|
||||
val date2 = Instant.ofEpochSecond(timestamp2).atZone(zoneId).toLocalDate()
|
||||
return date1 == date2
|
||||
}
|
||||
Reference in New Issue
Block a user