php - Get timestamps of current week -


I have the date time of the present day. I need to get two Unix timestamps for the start and end of the current week. How can I use the dateperiod or dateinterval class?

$ Start_of_week = strtotime ('last Monday', $ now); // week BEGINNING finally gives you $ end_of_week = strtotime ('next Sunday', $ now) + 86400; // gives you time at the end of the last day of the week

Comments

Popular posts from this blog

android - How can I execute default sms app? -

jquery .css('text-decoration') doesn't work from parents -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -