function dob($dob) {
list($year,$month,$day) = sscanf($dob,'%4d-%2d-%2d');
- $f = Config::get('system', 'birthday_input_format');
- if (! $f) {
- $f = 'ymd';
- }
if ($dob <= '0001-01-01') {
$value = '';
} else {
*
* @return string Parsed HTML output.
*/
-function datesel($format, $min, $max, $default, $id = 'datepicker') {
- return datetimesel($format, $min, $max, $default, '', $id, true, false, '', '');
+function datesel($min, $max, $default, $id = 'datepicker')
+{
+ return datetimesel($min, $max, $default, '', $id, true, false, '', '');
}
/**
* @brief Returns a time selector
*
- * @param string $format
- * Format string, e.g. 'ymd' or 'mdy'. Not currently supported
* @param $h
* Already selected hour
* @param $m
*
* @return string Parsed HTML output.
*/
-function timesel($format, $h, $m, $id = 'timepicker') {
- return datetimesel($format, new DateTime(), new DateTime(), new DateTime("$h:$m"), '', $id, false, true);
+function timesel($h, $m, $id = 'timepicker')
+{
+ return datetimesel(new DateTime(), new DateTime(), new DateTime("$h:$m"), '', $id, false, true);
}
/**
* @brief Returns a datetime selector.
*
- * @param string $format
- * format string, e.g. 'ymd' or 'mdy'. Not currently supported
* @param string $min
* unix timestamp of minimum date
* @param string $max
* @todo Once browser support is better this could probably be replaced with
* native HTML5 date picker.
*/
-function datetimesel($format, $min, $max, $default, $label, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '', $required = false) {
-
+function datetimesel($min, $max, $default, $label, $id = 'datetimepicker', $pickdate = true, $picktime = true, $minfrom = '', $maxfrom = '', $required = false)
+{
// First day of the week (0 = Sunday)
$firstDay = PConfig::get(local_user(), 'system', 'first_day_of_week', 0);
$fhour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'H') : 0);
$fminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'i') : 0);
- $f = Config::get('system','event_input_format');
- if (! $f) {
- $f = 'ymd';
- }
-
require_once 'include/acl_selectors.php' ;
$perms = get_acl_permissions($orig_event);
'$title' => t('Event details'),
'$desc' => t('Starting date and Title are required.'),
'$s_text' => t('Event Starts:') . ' <span class="required" title="' . t('Required') . '">*</span>',
- '$s_dsel' => datetimesel($f, new DateTime(), DateTime::createFromFormat('Y', $syear+5), DateTime::createFromFormat('Y-m-d H:i', "$syear-$smonth-$sday $shour:$sminute"), t('Event Starts:'), 'start_text', true, true, '', '', true),
+ '$s_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $syear+5), DateTime::createFromFormat('Y-m-d H:i', "$syear-$smonth-$sday $shour:$sminute"), t('Event Starts:'), 'start_text', true, true, '', '', true),
'$n_text' => t('Finish date/time is not known or not relevant'),
'$n_checked' => $n_checked,
'$f_text' => t('Event Finishes:'),
- '$f_dsel' => datetimesel($f, new DateTime(), DateTime::createFromFormat('Y', $fyear+5), DateTime::createFromFormat('Y-m-d H:i', "$fyear-$fmonth-$fday $fhour:$fminute"), t('Event Finishes:'), 'finish_text', true, true, 'start_text'),
+ '$f_dsel' => datetimesel(new DateTime(), DateTime::createFromFormat('Y', $fyear+5), DateTime::createFromFormat('Y-m-d H:i', "$fyear-$fmonth-$fday $fhour:$fminute"), t('Event Finishes:'), 'finish_text', true, true, 'start_text'),
'$a_text' => t('Adjust for viewer timezone'),
'$a_checked' => $a_checked,
'$d_text' => t('Description:'),