Returns the first day of the specified month, functionget_the_month_first_day_str ($ theyear, $ themonth) {returndate (& amp; quot; Y-m-d & amp; quot;, mktime (0, 0, 0, $ themonth, 1, $ theyear);} returns the last day of the specified month fun...
// Return the function get_the_month_first_day_str ($ theyear, $ themonth) {return date ("Y-m-d", mktime (0, 0, 0, $ themonth, 1, $ theyear);} // returns the function get_the_month_last_day_str ($ theyear, $ themonth) {$ theday = date ("t", mktime (0, 0, 0, $ themonth, 1, $ theyear); return date ("Y-m-d", mktime (0, 0, 0, $ themonth, $ theday, $ theyear);} // returns the first day of the week of the specified date (Sunday is the first day, Monday is the second day, and so on) function get_the_week_first_day_str ($ theyear, $ themonth, $ theday) {$ date = mktime (0, 0, 0, $ themonth, $ theday, $ theyear ); $ date = $ date-(24*60*60 * date ("w", $ date); return date ("Y-m-d", $ date );} // return the last day of the week of the specified date (Sunday is the first day, Monday is the second day, and so on) function get_the_week_last_day_str ($ theyear, $ themonth, $ theday) {$ date = mktime (0, 0, 0, $ themonth, $ theday, $ theyear ); $ date = $ date-(24*60*60 * date ("w", $ date) + (24*60*60*6 ); return date ("Y-m-d", $ date );}