diff options
author | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2016-10-02 00:41:25 +0200 |
---|---|---|
committer | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2016-10-13 11:27:23 +0200 |
commit | 7b41839ea8f2aad020444c42f2cba89040ca28b8 (patch) | |
tree | acf1495c556a0ce82823e47ebcdfa21377f92b61 /include/datetime.php | |
parent | 6532972e61a2aa5e8517ebcca3113adb3c8f336d (diff) | |
download | volse-hubzilla-7b41839ea8f2aad020444c42f2cba89040ca28b8.tar.gz volse-hubzilla-7b41839ea8f2aad020444c42f2cba89040ca28b8.tar.bz2 volse-hubzilla-7b41839ea8f2aad020444c42f2cba89040ca28b8.zip |
[TASK] Update Doxyfile and fix Doxygen errors.
Updated Doxyfile to include new folders.
Add a list for @hooks tags.
Fixed some parsing problems for Doxygen.
Diffstat (limited to 'include/datetime.php')
-rw-r--r-- | include/datetime.php | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/include/datetime.php b/include/datetime.php index cd08ab367..85e87848b 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -92,8 +92,8 @@ function datetime_convert($from = 'UTC', $to = 'UTC', $s = 'now', $fmt = "Y-m-d // Slight hackish adjustment so that 'zero' datetime actually returns what is intended // otherwise we end up with -0001-11-30 ... - // add 32 days so that we at least get year 00, and then hack around the fact that - // months and days always start with 1. + // add 32 days so that we at least get year 00, and then hack around the fact that + // months and days always start with 1. // if(substr($s,0,10) == '0000-00-00') { // $d = new DateTime($s . ' + 32 days', new DateTimeZone('UTC')); @@ -195,7 +195,7 @@ function timesel($format, $h, $m, $id='timepicker') { /** * @brief Returns a datetime selector. * - * @param $format + * @param string $format * format string, e.g. 'ymd' or 'mdy'. Not currently supported * @param $min * unix timestamp of minimum date @@ -203,6 +203,7 @@ function timesel($format, $h, $m, $id='timepicker') { * unix timestap of maximum date * @param $default * unix timestamp of default date + * @param string $label * @param string $id * id and name of datetimepicker (defaults to "datetimepicker") * @param boolean $pickdate @@ -214,8 +215,9 @@ function timesel($format, $h, $m, $id='timepicker') { * @param $maxfrom * set maximum date from picker with id $maxfrom (none by default) * @param boolean $required default false + * @param int $first_day (optional) default 0 * @return string Parsed HTML output. - * + * * @todo Once browser support is better this could probably be replaced with * native HTML5 date picker. */ @@ -239,10 +241,10 @@ function datetimesel($format, $min, $max, $default, $label, $id = 'datetimepicke if(!$picktime) $pickers .= ',timepicker: false, closeOnDateSelect:true'; $extra_js = ''; - if($minfrom != '') + if($minfrom != '') $extra_js .= "\$('#id_$minfrom').data('xdsoft_datetimepicker').setOptions({onChangeDateTime: function (currentDateTime) { \$('#id_$id').data('xdsoft_datetimepicker').setOptions({minDate: currentDateTime})}})"; - if($maxfrom != '') + if($maxfrom != '') $extra_js .= "\$('#id_$maxfrom').data('xdsoft_datetimepicker').setOptions({onChangeDateTime: function (currentDateTime) { \$('#id_$id').data('xdsoft_datetimepicker').setOptions({maxDate: currentDateTime})}})"; $readable_format = $dateformat; @@ -276,7 +278,7 @@ function datetimesel($format, $min, $max, $default, $label, $id = 'datetimepicke */ function relative_date($posted_date, $format = null) { - $localtime = datetime_convert('UTC', date_default_timezone_get(), $posted_date); + $localtime = datetime_convert('UTC', date_default_timezone_get(), $posted_date); $abs = strtotime($localtime); @@ -340,7 +342,7 @@ function plural_dates($k,$n) { return; } } - + @@ -512,7 +514,7 @@ function cal($y = 0, $m = 0, $links = false, $class='') { /** * @brief Return the next birthday, converted from the owner's timezone to UTC. - * + * * This makes it globally portable. * If the provided birthday lacks a month and or day, return an empty string. * A missing year is acceptable. @@ -554,7 +556,7 @@ function update_birthdays() { require_once('include/event.php'); require_once('include/permissions.php'); - $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash + $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_dob > %s + interval %s and abook_dob < %s + interval %s", db_utcnow(), db_quoteinterval('7 day'), db_utcnow(), db_quoteinterval('14 day') @@ -572,7 +574,7 @@ function update_birthdays() { $ev['dtend'] = datetime_convert('UTC', 'UTC', $rr['abook_dob'] . ' + 1 day '); $ev['adjust'] = intval(feature_enabled($rr['abook_channel'],'smart_birthdays')); $ev['summary'] = sprintf( t('%1$s\'s birthday'), $rr['xchan_name']); - $ev['description'] = sprintf( t('Happy Birthday %1$s'), + $ev['description'] = sprintf( t('Happy Birthday %1$s'), '[zrl=' . $rr['xchan_url'] . ']' . $rr['xchan_name'] . '[/zrl]') ; $ev['etype'] = 'birthday'; |