function date_example_date in Date 7
Same name and namespace in other branches
- 8 date_api/date_api.module \date_example_date()
- 5.2 date/date_admin.inc \date_example_date()
- 6.2 date/date_admin.inc \date_example_date()
- 6 date/date_admin.inc \date_example_date()
- 7.3 date_api/date_api.module \date_example_date()
- 7.2 date_api/date_api.module \date_example_date()
Get an example date and make sure the difference between month and day and 12 and 24 hours will be clear.
1 call to date_example_date()
File
- ./
date_admin.inc, line 487 - Date administration code. Moved to separate file since there is a lot of code here that is not needed often.
Code
function date_example_date() {
$now = date_now();
if (date_format($now, 'm') == date_format($now, 'd')) {
date_modify($now, '+1 day');
}
if (date_format($now, 'H') == date_format($now, 'h')) {
date_modify($now, '+12 hours');
}
return $now;
}