1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
<?php
echo"<pre>";
echodate("Y-m-d",strtotime("now")),"\n";
echo"<pre>";
echodate("Y-m-d",strtotime("-1 week Monday")),"\n";
echo"<pre>";
echodate("Y-m-d",strtotime("-1 week Sunday")),"\n";
echo"<pre>";
echodate("Y-m-d",strtotime("+0 week Monday")),"\n";
echo"<pre>";
echodate("Y-m-d",strtotime("+0 week Sunday")),"\n";
echo"<pre>";
echo"*********第几个月:";
echodate('n');
echo"<pre>";
echo"*********本周周几:";
echodate("w");
echo"<pre>";
echo"*********本月天数:";
echodate("t");
echo"<pre>";
echo'<br>上周:<br>';
echodate("Y-m-d H:i:s",mktime(0, 0 , 0,date("m"),date("d")-date("w")+1-7,date("Y"))),"\n";
echodate("Y-m-d H:i:s",mktime(23,59,59,date("m"),date("d")-date("w")+7-7,date("Y"))),"\n";
echo"<pre>";
echo'<br>本周:<br>';
echodate("Y-m-d H:i:s",mktime(0, 0 , 0,date("m"),date("d")-date("w")+1,date("Y"))),"\n";
echodate("Y-m-d H:i:s",mktime(23,59,59,date("m"),date("d")-date("w")+7,date("Y"))),"\n";
echo"<pre>";
echo'<br>上上月:<br>';
echodate("Y-m-d H:i:s",mktime(0, 0 , 0,date("m")-2,1,date("Y"))),"\n";
echodate("Y-m-d H:i:s",mktime(23,59,59,date("m")-1,0,date("Y"))),"\n";
echo"<pre>";
echo'<br>上月:<br>';
echodate("Y-m-d H:i:s",mktime(0, 0 , 0,date("m")-1,1,date("Y"))),"\n";
echodate("Y-m-d H:i:s",mktime(23,59,59,date("m") ,0,date("Y"))),"\n";
echo"<pre>";
echo'<br>本月:<br>';
echodate("Y-m-d H:i:s",mktime(0, 0 , 0,date("m"),1,date("Y"))),"\n";
echodate("Y-m-d H:i:s",mktime(23,59,59,date("m"),date("t"),date("Y"))),"\n";
echo"<pre>";
echo"<pre>";
$season=ceil((date('n'))/3)-2;//上季度是第几季度
echo'<br>上上季度:<br>';
echodate('Y-m-d H:i:s',mktime(0, 0, 0,$season*3-3+1,1,date('Y'))),"\n";
echodate('Y-m-d H:i:s',mktime(23,59,59,$season*3,date('t',mktime(0, 0 , 0,$season*3,1,date("Y"))),date('Y'))),"\n";
echo"<pre>";
echo"<pre>";
$season=ceil((date('n'))/3)-1;//上季度是第几季度
echo'<br>上季度:<br>';
echodate('Y-m-d H:i:s',mktime(0, 0, 0,$season*3-3+1,1,date('Y'))),"\n";
echodate('Y-m-d H:i:s',mktime(23,59,59,$season*3,date('t',mktime(0, 0 , 0,$season*3,1,date("Y"))),date('Y'))),"\n";
echo"<pre>";
echo$season=ceil((date('n'))/3);//当月是第几季度
echo'<br>本季度:<br>';
echodate('Y-m-d H:i:s',mktime(0, 0, 0,$season*3-3+1,1,date('Y'))),"\n";
echodate('Y-m-d H:i:s',mktime(23,59,59,$season*3,date('t',mktime(0, 0 , 0,$season*3,1,date("Y"))),date('Y'))),"\n";
$season=ceil((date('n'))/3)+1;//当月是第几季度
echo'<br>下季度:<br>';
echodate('Y-m-d H:i:s',mktime(0, 0, 0,$season*3-3+1,1,date('Y'))),"\n";
echodate('Y-m-d H:i:s',mktime(23,59,59,$season*3,date('t',mktime(0, 0 , 0,$season*3,1,date("Y"))),date('Y'))),"\n";
echo"<pre>";
?>
|
哈尔滨品用软件有限公司致力于为哈尔滨的中小企业制作大气、美观的优秀网站,并且能够搭建符合百度排名规范的网站基底,使您的网站无需额外费用,即可稳步提升排名至首页。欢迎体验最佳的哈尔滨网站建设。