public static function niceTimeDiff($d1, $d2, $limitPeriods = 2)
    {
        if (!is_int($d1)) {
            $d1 = self::strtotime($d1);
        }
        if (!is_int($d2)) {
            $d2 = self::strtotime($d2);
        }
        if (empty($d1) or empty($d2)) {
            return false;
        }
        $max = max($d1, $d2);
        $min = min($d1, $d2);
        $diff = $max - $min;

        return self::niceDuration($diff, $limitPeriods);
    }