Swat/SwatString.php
public static function toHumanReadableTimePeriodWithWeeks(
        $seconds,
        $largest_part = false
    ) {
        $interval_parts =
            SwatDate::DI_YEARS |
            SwatDate::DI_WEEKS |
            SwatDate::DI_DAYS |
            SwatDate::DI_HOURS |
            SwatDate::DI_MINUTES |
            SwatDate::DI_SECONDS;

        $parts = self::getHumanReadableTimePeriodParts(
            $seconds,
            $interval_parts
        );

        return self::toHumanReadableTimePeriodString($parts, $largest_part);
    }
public static function toHumanReadableTimePeriodWithWeeks(
        $seconds,
        $largest_part = false
    ) {
        $interval_parts =
            SwatDate::DI_YEARS |
            SwatDate::DI_WEEKS |
            SwatDate::DI_DAYS |
            SwatDate::DI_HOURS |
            SwatDate::DI_MINUTES |
            SwatDate::DI_SECONDS;

        $parts = self::getHumanReadableTimePeriodParts(
            $seconds,
            $interval_parts
        );

        return self::toHumanReadableTimePeriodString($parts, $largest_part);
    }
public static function toHumanReadableTimePeriodWithWeeks ( $ seconds , $ largest_part = false ) { $ interval_parts = SwatDate :: DI_YEARS | SwatDate :: DI_WEEKS | SwatDate :: DI_DAYS | SwatDate :: DI_HOURS | SwatDate :: DI_MINUTES | SwatDate :: DI_SECONDS ; $ parts = self :: getHumanReadableTimePeriodParts ( $ seconds , $ interval_parts ) ; return self :: toHumanReadableTimePeriodString ( $ parts , $ largest_part ) ; }
Gets a human-readable string representing a time period that includes
weeks.

This method formats seconds as a time period. Given an example value
of 161740805, the formatted value "5 years, 12 weeks, 2 days and 5
seconds" is returned. Months are not returned as combining months and
weeks in the same string can be confusing for people to parse.

As this method applies on seconds, no time zone considerations are
made. Years are assumed to be 365 days. Months are assumed to be 30 days.

@param integer $seconds seconds to format.
@param boolean $largest_part optional. If true, only the largest
matching date part is returned. For the
above example, "5 years" is returned.

@return string A human-readable time period.
Gets a human - readable string representing a time period that includes weeks .