public static function wasLastYear($time) {
        $start = static::factory('last year January 1st 00:00:00');

        $end = clone $start;
        $end->modify('next year -1 second');

        $time = static::factory($time);

        return ($time >= $start && $time <= $end);
    }
public static function wasLastYear($time) {
        $start = static::factory('last year January 1st 00:00:00');

        $end = clone $start;
        $end->modify('next year -1 second');

        $time = static::factory($time);

        return ($time >= $start && $time <= $end);
    }
public static function wasLastYear ( $ time ) { $ start = static :: factory ( 'last year January 1st 00:00:00' ) ; $ end = clone $ start ; $ end -> modify ( 'next year -1 second' ) ; $ time = static :: factory ( $ time ) ; return ( $ time >= $ start && $ time <= $ end ) ; }
Returns true if date passed was within last year.

@param string|int $time
@return bool
Returns true if date passed was within last year .