Date ("y-m-d"); |
|
|
|
|
PHP Get yesterday date |
|
Date ("y-m-d", strtotime ("-1 Day")) |
|
|
|
PHP Get tomorrow Date |
|
Date ("y-m-d", strtotime ("+1 Day")) |
|
|
|
PHP gets a week after date |
|
Date ("y-m-d", strtotime ("+1 Week")) |
|
|
|
PHP gets 2 days, four hours, two seconds, time a week. |
|
Date ("y-m-d g:h:s", strtotime ("+1 Week 2 days 4 hours 2 Seconds")) |
|
|
|
PHP Get next week 4th period |
|
Date ("y-m-d", strtotime ("next Thursday")) |
|
|
|
PHP get last week 1st period |
|
Date ("y-m-d", strtotime ("last Monday")) |
|
|
|
PHP gets one month ago date |
|
Date ("y-m-d", strtotime ("last Month")) |
|
|
|
PHP gets one months after date |
|
Date ("y-m-d", strtotime ("+1 Month")) |
|
|
|
PHP gets ten years later date |
|
Date ("y-m-d", strtotime ("+10 Year")) |
|
|
|
PHP get today start and end timestamp |
|
Mktime (0,0,0,date (' m '), date (' d '), date (' Y ')); |
|
Mktime (0,0,0,date (' m '), date (' d ') +1,date (' Y '))-1; |
|
|
|
PHP gets yesterday start time stamp |
|
Mktime (0,0,0,date (' m '), date (' d ') -1,date (' Y ')); |
|
Mktime (0,0,0,date (' m '), date (' d '), date (' Y '))-1; |
|
|
|
PHP gets last week time stamp |
|
Mktime (0,0,0,date (' m '), date (' d ')-date (' w ') +1-7,date (' Y ')); |
|
Mktime (23,59,59,date (' m '), date (' d ')-date (' w ') +7-7,date (' Y ')); |
|
|
|
PHP gets this month's start time stamp |
|
Mktime (0,0,0,date (' m '), 1,date (' Y ')); |
|
Mktime (23,59,59,date (' m '), date (' t '), date (' Y ')); |