diff --git a/src/main/kotlin/org/hydev/mc/ActiveList.kt b/src/main/kotlin/org/hydev/mc/ActiveList.kt index 956b5aa..cb3c90c 100644 --- a/src/main/kotlin/org/hydev/mc/ActiveList.kt +++ b/src/main/kotlin/org/hydev/mc/ActiveList.kt @@ -28,3 +28,9 @@ class ActiveList : JavaPlugin(), CommandExecutor return true } } + +fun Date.format(f: String = "yyyy-MM-dd"): String +{ + val date = this.toInstant().atZone(ZoneId.systemDefault()).toLocalDate() + return date.format(DateTimeFormatter.ofPattern(f)) +}