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