I used date(\'w\', timestamp) and date(\'w\', timestamp) to know the day, date(\'n\', timestamp) for months, etc.
date(\'w\', timestamp)
date(\'n\', timestamp)
Now I\'m using d
Use DateTime with DateTime::format()
$datetime = new DateTime($dateTimeString); echo $datetime->format('w');