php - Best way to check if today is the first of the month -
this question has answer here:
i have 2 functions checking if today first day of month. 1 of these have advantage on other, ie accuracy?
if(date('j', $timestamp) === '1') { } if(date('y-m-d') == date('y-m-01')) { }
the first 1 less checking use that.
you don't need timestamp argument if want check / today
Comments
Post a Comment