I want to create a function which outputs a list of the first date of the month and last date of the month based on the year, which is given as an argument.
function first_and_last_dates_of_month($year){
//code
}
first_and_last_dates_of_month(2014);
I want to have the output somthing like this:
2014-01-01
2014-01-31
2014-02-01
2014-02-28
2014-03-01
2014-03-31
2014-04-01
2014-04-30
2014-05-01
2014-05-31
2014-06-01
2014-06-30
2014-07-01
2014-07-31
2014-08-01
2014-08-31
2014-09-01
2014-09-30
2014-10-01
2014-10-31
2014-11-01
2014-11-30
2014-12-01
2014-12-31