HEX
Server: nginx/1.28.3
System: Linux lightweb-s1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User: drdrivek-71 (1047)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: /home/mocapict-106/mocapictures.kr/app/Services/Utility.php
<?php

namespace App\Services;

use Carbon\Carbon;

class Utility {
    const CounselorRoleName = "counselor";

    public static function getYearOption($start = null, $end = null): array
    {
        $dateOfEstablishment = '01/01/2015';
        if(!$start) $start = Carbon::now()->addYears(3)->format('Y');
        if(!$end) $end = Carbon::createFromFormat('m/d/Y', $dateOfEstablishment)->format('Y');

        $yearList = [];
        foreach(range($start, $end) as $year) {
            $yearList[$year] = sprintf("%s 년",$year);
        }

        return $yearList;
    }
}