From 5adac967a0f5f913139059e88d44eb92b101ec70 Mon Sep 17 00:00:00 2001 From: whwyy Date: Fri, 1 Dec 2023 11:35:50 +0800 Subject: [PATCH] eee --- kiri-engine/Core/DateFormat.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kiri-engine/Core/DateFormat.php b/kiri-engine/Core/DateFormat.php index 62f23fed..6400b122 100644 --- a/kiri-engine/Core/DateFormat.php +++ b/kiri-engine/Core/DateFormat.php @@ -29,6 +29,19 @@ class DateFormat } + /** + * @param int $time + * @return array + */ + public static function timeFromStrDate(int $time): array + { + $year = date('Y', $time); + $month = date('m', $time); + $day = date('d', $time); + return [$year, $month, $day]; + } + + /** * @param $time * @return bool|false|int|string