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
Post a Comment