Answers for "get financial month year in php"

PHP
0

php get start and end date of month and year

<?php

$query_date = '2010-02-04';

// First day of the month.
echo date('Y-m-01', strtotime($query_date));

// Last day of the month.
echo date('Y-m-t', strtotime($query_date));
Posted by: Guest on July-01-2020
0

financial year calculation in php

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;
}
Posted by: Guest on November-10-2021

Code answers related to "get financial month year in php"

Browse Popular Code Answers by Language