function date_range_valid in Date 6.2
Same name and namespace in other branches
- 8 date_api/date_api.module \date_range_valid()
- 7.3 date_api/date_api.module \date_range_valid()
- 7 date_api/date_api.module \date_range_valid()
- 7.2 date_api/date_api.module \date_range_valid()
2 calls to date_range_valid()
- DateAPITestCase::testDateAPI in tests/
date_api.test - _date_widget_settings in date/
date_admin.inc - Implementation of hook_widget_settings().
File
- ./
date_api.module, line 2578 - 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_range_valid($string) {
$matches = preg_match('@^(\\-[0-9]+|[0-9]{4}):([\\+|\\-][0-9]+|[0-9]{4})$@', $string);
return $matches < 1 ? FALSE : TRUE;
}