PHP get first day of current month, datepicker friendly

The simplest and readable way to do it is using this clean solution. All you need is a string represent the date.

First day of the month:

date('Y-m-01');

Last day of the month:

date('Y-m-t');

By Keenlio, December 22, 2014

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *


− one = 0

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>