function date_example_date in Date 6
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()
- 7.3 date_api/date_api.module \date_example_date()
- 7 date_admin.inc \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.
2 calls to date_example_date()
- date_format_options in date/
date_admin.inc - Store personalized format options for each user.
- date_widget_settings_form in date/
date_admin.inc
File
- date/
date_admin.inc, line 509 - 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;
}