<?php
namespace Root\Core\Helper;

use Carbon\Carbon;

class Time
{
    public static function diffForHumans(string|\DateTimeInterface $date): string
    {
        return Carbon::parse($date)->diffForHumans();
    }

    public static function isExpired(string|\DateTimeInterface $date): bool
    {
        return Carbon::parse($date)->isPast();
    }
}
