Php Chinese network (www.php.cn) provides the most comprehensive basic tutorial on programming technology, introducing HTML, CSS, Javascript, Python, Java, Ruby, C, PHP, basic knowledge of MySQL and other programming languages. At the same time, this site also provides a large number of online instances, through which you can better learn programming...
Last week start time:
'; Echo date ("Y-m-d H: I: s", mktime (0, 0, 0, date ("m"), date ("d ") -date ("w") + 1-7, date ("Y"), "\ n"; echo date ("Y-m-d H: I: s ", mktime (23,59, 59, date (" m "), date (" d ")-date (" w ") + 7-7, date ("Y"), "\ n"; echo'
Start time of the week:
'; Echo date ("Y-m-d H: I: s", mktime (0, 0, 0, date ("m"), date ("d ") -date ("w") + 1, date ("Y"), "\ n"; echo date ("Y-m-d H: I: s ", mktime (23, 59, 59, date ("m"), date ("d")-date ("w") + 7, date ("Y "))), "\ n"; echo'
Start time of last month:
'; Echo date ("Y-m-d H: I: s", mktime (0, 0, 0, date ("m")-1, 1, date ("Y"), "\ n"; echo date ("Y-m-d H: I: s", mktime (, 59, 59, date ("m"), 0, date ("Y"), "\ n"; echo'
Start time of this month:
'; Echo date ("Y-m-d H: I: s", mktime (0, 0, 0, date ("m"), 1, date ("Y"), "\ n"; echo date ("Y-m-d H: I: s", mktime (, 59, 59, date ("m"), date ("t"), date ("Y"), "\ n "; $ season = ceil (date ('N')/3); // The quarter of the month echo'
Start time of this quarter:
'; Echo date ('Y-m-d H: I: S', mktime (0, 0, 0, $ season * 3-3 + 1,1, date ('Y'), "\ n"; echo date ('Y-m-d H: I: S', mktime (, 59, 59, $ season * 3, date ('t', mktime (0, 0, 0, $ season * 3, 1, date ("Y "))), date ('Y'), "\ n"; $ season = ceil (date ('N')/3)-1; // the first quarter of the last quarter echo'
Start time of the last quarter:
'; Echo date ('Y-m-d H: I: S', mktime (0, 0, 0, $ season * 3-3 + 1,1, date ('Y'), "\ n"; echo date ('Y-m-d H: I: S', mktime (, 59, 59, $ season * 3, date ('t', mktime (0, 0, 0, $ season * 3, 1, date ("Y "))), date ('Y'), "\ n";?>
Php two dates minus the number of days: