function date_now in Date 7
Same name and namespace in other branches
- 5.2 date_api.module \date_now()
- 6.2 date_api.module \date_now()
- 6 date_api.module \date_now()
- 7.3 date_api/date_api.module \date_now()
- 7.2 date_api/date_api.module \date_now()
A date object for the current time.
Parameters
$timezone: Optional method to force time to a specific timezone, defaults to user timezone, if set, otherwise site timezone.
Return value
object date
23 calls to date_now()
- DateAPITestCase::testDateAPI in tests/
date_api.test - DateObject::arrayErrors in date_api/
date_api.module - DateObject::forceValid in date_api/
date_api.module - Convert a date part into something that will produce a valid date.
- date_days_in_year in date_api/
date_api.module - Identify the number of days in a year for a date.
- date_day_of_week in date_api/
date_api.module - Returns day of week for a given date (0 = Sunday).
File
- date_api/
date_api.module, line 1282 - This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.
Code
function date_now($timezone = NULL) {
return new DateObject('now', $timezone);
}