📜  php代码示例中的财政年度计算

📅  最后修改于: 2022-03-11 14:54:30.675000             🧑  作者: Mango

代码示例1
function get_finacial_year_range() {
    $year = date('Y');
    $month = date('m');
    if($month<4){
        $year = $year-1;
    }
    $start_date = date('d/m/Y',strtotime(($year).'-04-01'));
    $end_date = date('d/m/Y',strtotime(($year+1).'-03-31'));
    $response = array('start_date' => $start_date, 'end_date' => $end_date);
    return $response;
}