App\Libraries\Utils::getYear PHP Method

getYear() private static method

private static getYear ( $offset )
    private static function getYear($offset)
    {
        $year = intval(date('Y'));
        return $year + $offset;
    }

Usage Example

Example #1
0
 private static function getDatePart($part, $offset)
 {
     $offset = intval($offset);
     if ($part == 'MONTH') {
         return Utils::getMonth($offset);
     } elseif ($part == 'QUARTER') {
         return Utils::getQuarter($offset);
     } elseif ($part == 'YEAR') {
         return Utils::getYear($offset);
     }
 }