I want to get day number of week of the current month. For example
to day
Sep. 1st, Monday
should return 1
Oct. 1st, Wednesday
should return 3
21.11.2014
should return 6
Try this:
var_dump(date('N', mktime(0, 0, 0, date('n'), 1)));
It's not clear from your question whether your input is a string or whether the function should assume the current month/year that is right now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With