Is there any function or method in PHP that would be useful in determining the half of the month of the corresponding date? -


this technique used in payroll system in have determine if end of month (usually, 28th, 31st or 30th day of month) , half of month (15th day of month). there function determine it?

there no ready made functions, can create conditions needed, see example below:

half of month:

if(date('d') == 15){     echo 'today half of month'; } 

end of month:

if(date('d') == date('t')){     echo 'today end of month' } 

additionally, suggest go through date ref in php manual


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -