whats the use of these functions
can someone explain me why these functions exist
they appear in Pear Date/Calc.php
it takes in two variables does nothing to them and returns a constant, why can't you just use global FIRST_DAY_OF_MONTH = 1;
here is another one
you would assume that the getMonths() function prolly does something fancy to get the first month of a year which is '1' assuming sometimes in the past jan wasn't the first month of the year, hence the need for this. but nop. getMonths() returns an array
i think this can be used for lunar calendar, so you can change the getMonths() to your calendar need
they appear in Pear Date/Calc.php
function getFirstDayOfMonth($pn_month, $pn_year)
{
return 1;
}
it takes in two variables does nothing to them and returns a constant, why can't you just use global FIRST_DAY_OF_MONTH = 1;
here is another one
function getFirstMonthOfYear($pn_year)
{
$ha_months = Date_Calc::getMonths($pn_year);
return $ha_months[0];
}
you would assume that the getMonths() function prolly does something fancy to get the first month of a year which is '1' assuming sometimes in the past jan wasn't the first month of the year, hence the need for this. but nop. getMonths() returns an array
function getMonths($pn_year)
{
return array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
}
i think this can be used for lunar calendar, so you can change the getMonths() to your calendar need
0
This discussion has been closed.
Comments