Index: t3lib/class.t3lib_befunc.php =================================================================== --- t3lib/class.t3lib_befunc.php (Revision 8042) +++ t3lib/class.t3lib_befunc.php (Arbeitskopie) @@ -1602,10 +1602,13 @@ * * @param integer Time stamp, seconds * @return integer + * @ignore + * @deprecated since TYPO3 4.5 - Use the function t3lib_utility_Date::daysUntil() */ public static function daysUntil($tstamp) { - $delta_t = $tstamp-$GLOBALS['EXEC_TIME']; - return ceil($delta_t/(3600*24)); + t3lib_div::logDeprecatedFunction(); + + return t3lib_utility_Date::daysUntil($tstamp); } /** @@ -1614,9 +1617,13 @@ * * @param integer Time stamp, seconds * @return string Formatted time + * @ignore + * @deprecated since TYPO3 4.5 - Use the function t3lib_utility_Date::date() */ public static function date($tstamp) { - return date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], (int)$tstamp); + t3lib_div::logDeprecatedFunction(); + + return t3lib_utility_Date::date($tstamp); } /** @@ -1625,9 +1632,13 @@ * * @param integer Time stamp, seconds * @return string Formatted time + * @ignore + * @deprecated since TYPO3 4.5 - Use the function t3lib_utility_Date::datetime() */ public static function datetime($value) { - return date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'].' '.$GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $value); + t3lib_div::logDeprecatedFunction(); + + return t3lib_utility_Date::datetime($value); } /** @@ -1638,16 +1649,13 @@ * @param integer Time stamp, seconds * @param boolean Output hh:mm:ss. If false: hh:mm * @return string Formatted time + * @ignore + * @deprecated since TYPO3 4.5 - Use the function t3lib_utility_Date::time() */ public static function time($value, $withSeconds = TRUE) { - $hh = floor($value/3600); - $min = floor(($value-$hh*3600)/60); - $sec = $value-$hh*3600-$min*60; - $l = sprintf('%02d', $hh).':'.sprintf('%02d', $min); - if ($withSeconds) { - $l .= ':'.sprintf('%02d', $sec); - } - return $l; + t3lib_div::logDeprecatedFunction(); + + return t3lib_utility_Date::time($value, $withSeconds); } /** @@ -1657,21 +1665,13 @@ * @param integer $seconds could be the difference of a certain timestamp and time() * @param string $labels should be something like ' min| hrs| days| yrs'. This value is typically delivered by this function call: $GLOBALS["LANG"]->sL("LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears") * @return string Formatted time + * @ignore + * @deprecated since TYPO3 4.5 - Use the function t3lib_utility_Date::calcAge() */ public static function calcAge($seconds, $labels = 'min|hrs|days|yrs') { - $labelArr = explode('|', $labels); - $prefix = ''; - if ($seconds<0) {$prefix = '-'; $seconds = abs($seconds);} - if ($seconds<3600) { - $seconds = round ($seconds/60).' '.trim($labelArr[0]); - } elseif ($seconds<24*3600) { - $seconds = round ($seconds/3600).' '.trim($labelArr[1]); - } elseif ($seconds<365*24*3600) { - $seconds = round ($seconds/(24*3600)).' '.trim($labelArr[2]); - } else { - $seconds = round ($seconds/(365*24*3600)).' '.trim($labelArr[3]); - } - return $prefix.$seconds; + t3lib_div::logDeprecatedFunction(); + + return t3lib_utility_Date::calcAge($seconds, $labels); } /** @@ -1683,12 +1683,13 @@ * @param integer 1/-1 depending on polarity of age. * @param string $date=="date" will yield "dd:mm:yy" formatting, otherwise "dd:mm:yy hh:mm" * @return string + * @ignore + * @deprecated since TYPO3 4.5 - Use the function t3lib_utility_Date::calcAge() */ public static function dateTimeAge($tstamp, $prefix = 1, $date = '') { - return $tstamp ? - ($date=='date' ? self::date($tstamp) : self::datetime($tstamp)) . - ' (' . self::calcAge($prefix * ($GLOBALS['EXEC_TIME'] - $tstamp), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) . ')' - : ''; + t3lib_div::logDeprecatedFunction(); + + return t3lib_utility_Date::dateTimeAge($tstamp, $prefix, $date); } /** @@ -1899,8 +1900,8 @@ } if ($row['nav_hide']) $parts[] = rtrim($LANG->sL($TCA['pages']['columns']['nav_hide']['label']), ':'); if ($row['hidden']) $parts[] = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.hidden'); - if ($row['starttime']) $parts[] = $LANG->sL($TCA['pages']['columns']['starttime']['label']) . ' ' . self::dateTimeAge($row['starttime'], -1, 'date'); - if ($row['endtime']) $parts[] = $LANG->sL($TCA['pages']['columns']['endtime']['label']) . ' ' . self::dateTimeAge($row['endtime'], -1, 'date'); + if ($row['starttime']) $parts[] = $LANG->sL($TCA['pages']['columns']['starttime']['label']) . ' ' . t3lib_utility_Date::dateTimeAge($row['starttime'], -1, 'date'); + if ($row['endtime']) $parts[] = $LANG->sL($TCA['pages']['columns']['endtime']['label']) . ' ' . t3lib_utility_Date::dateTimeAge($row['endtime'], -1, 'date'); if ($row['fe_group']) { $fe_groups = array(); foreach (t3lib_div::intExplode(',', $row['fe_group']) as $fe_group) { @@ -1967,13 +1968,13 @@ if ($ctrl['starttime']) { if ($row[$ctrl['starttime']] > $GLOBALS['EXEC_TIME']) { $out .= ' - ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.starttime') . ':' . - self::date($row[$ctrl['starttime']]) . ' (' . self::daysUntil($row[$ctrl['starttime']]) . ' ' . + t3lib_utility_Date::date($row[$ctrl['starttime']]) . ' (' . t3lib_utility_Date::daysUntil($row[$ctrl['starttime']]) . ' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.days') . ')'; } } if ($row[$ctrl['endtime']]) { $out .= ' - ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.endtime') . ': ' . - self::date($row[$ctrl['endtime']]) . ' (' . self::daysUntil($row[$ctrl['endtime']]) . ' ' . + t3lib_utility_Date::date($row[$ctrl['endtime']]) . ' (' . t3lib_utility_Date::daysUntil($row[$ctrl['endtime']]) . ' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.days') . ')'; } } @@ -2251,17 +2252,17 @@ case 'input': if (isset($value)) { if (t3lib_div::inList($theColConf['eval'], 'date')) { - $l = self::date($value) . + $l = t3lib_utility_Date::date($value) . ' (' . ($GLOBALS['EXEC_TIME'] - $value > 0 ? '-' : '') . - self::calcAge(abs($GLOBALS['EXEC_TIME'] - $value), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) . + t3lib_utility_Date::calcAge(abs($GLOBALS['EXEC_TIME'] - $value), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) . ')'; } elseif (t3lib_div::inList($theColConf['eval'], 'time')) { - $l = self::time($value, FALSE); + $l = t3lib_utility_Date::time($value, FALSE); } elseif (t3lib_div::inList($theColConf['eval'], 'timesec')) { - $l = self::time($value); + $l = t3lib_utility_Date::time($value); } elseif (t3lib_div::inList($theColConf['eval'], 'datetime')) { - $l = self::datetime($value); + $l = t3lib_utility_Date::datetime($value); } else { $l = $value; } @@ -2330,7 +2331,7 @@ if (!isset($fVnew)) { if (is_array($TCA[$table])) { if ($fN==$TCA[$table]['ctrl']['tstamp'] || $fN==$TCA[$table]['ctrl']['crdate']) { - $fVnew = self::datetime($fV); + $fVnew = t3lib_utility_Date::datetime($fV); } elseif ($fN=='pid'){ $fVnew = self::getRecordPath($fV, '1=1', 20); // Fetches the path with no regard to the users permissions to select pages. } else { @@ -4238,7 +4239,7 @@ $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:warning.backend_reference_index'), '', '', - self::dateTime($lastRefIndexUpdate)); + t3lib_utility_Date::dateTime($lastRefIndexUpdate)); } // Check for memcached if configured Index: t3lib/class.t3lib_tceforms.php =================================================================== --- t3lib/class.t3lib_tceforms.php (Revision 8042) +++ t3lib/class.t3lib_tceforms.php (Arbeitskopie) @@ -2999,7 +2999,7 @@ } if ($config['format.']['appendAge']) { $value .= ' (' . - t3lib_BEfunc::calcAge(($GLOBALS['EXEC_TIME'] - $itemValue), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) . + t3lib_utility_Date::calcAge(($GLOBALS['EXEC_TIME'] - $itemValue), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) . ')'; } $itemValue = $value; Index: t3lib/core_autoload.php =================================================================== --- t3lib/core_autoload.php (Revision 8042) +++ t3lib/core_autoload.php (Arbeitskopie) @@ -130,6 +130,7 @@ 't3lib_utility_client' => PATH_t3lib . 'utility/class.t3lib_utility_client.php', 't3lib_utility_http' => PATH_t3lib . 'utility/class.t3lib_utility_http.php', 't3lib_utility_mail' => PATH_t3lib . 'utility/class.t3lib_utility_mail.php', + 't3lib_utility_date' => PATH_t3lib . 'utility/class.t3lib_utility_date.php', 't3lib_spritemanager' => PATH_t3lib . 'class.t3lib_spritemanager.php', 't3lib_spritemanager_spriteicongenerator' => PATH_t3lib . 'interfaces/interface.t3lib_spritemanager_spriteicongenerator.php', 't3lib_spritemanager_simplehandler' => PATH_t3lib . 'spritemanager/class.t3lib_spritemanager_simplehandler.php', Index: t3lib/utility/class.t3lib_utility_date.php =================================================================== --- t3lib/utility/class.t3lib_utility_date.php (Revision 0) +++ t3lib/utility/class.t3lib_utility_date.php (Revision 0) @@ -0,0 +1,133 @@ + + * All rights reserved + * + * This script is part of the TYPO3 project. The TYPO3 project is + * free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * The GNU General Public License can be found at + * http://www.gnu.org/copyleft/gpl.html. + * A copy is found in the textfile GPL.txt and important notices to the license + * from the author is found in LICENSE.txt distributed with these scripts. + * + * + * This script is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * This copyright notice MUST APPEAR in all copies of the script! + ***************************************************************/ + +/** + * Class to handle dates and times. + * + * $Id$ + * + * @author Georg Ringer + */ +final class t3lib_utility_Date { + + + /** + * Returns the difference in days between input $tstamp and $EXEC_TIME + * Usage: 2 (class t3lib_BEfunc) + * + * @param integer Time stamp, seconds + * @return integer + */ + public static function daysUntil($tstamp) { + $delta_t = $tstamp-$GLOBALS['EXEC_TIME']; + return ceil($delta_t/(3600*24)); + } + + /** + * Returns $tstamp formatted as "ddmmyy" (According to $TYPO3_CONF_VARS['SYS']['ddmmyy']) + * Usage: 11 + * + * @param integer Time stamp, seconds + * @return string Formatted time + */ + public static function date($tstamp) { + return date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], (int)$tstamp); + } + + /** + * Returns $tstamp formatted as "ddmmyy hhmm" (According to $TYPO3_CONF_VARS['SYS']['ddmmyy'] AND $TYPO3_CONF_VARS['SYS']['hhmm']) + * Usage: 28 + * + * @param integer Time stamp, seconds + * @return string Formatted time + */ + public static function datetime($value) { + return date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'].' '.$GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $value); + } + + /** + * Returns $value (in seconds) formatted as hh:mm:ss + * For instance $value = 3600 + 60*2 + 3 should return "01:02:03" + * Usage: 1 (class t3lib_BEfunc) + * + * @param integer Time stamp, seconds + * @param boolean Output hh:mm:ss. If false: hh:mm + * @return string Formatted time + */ + public static function time($value, $withSeconds = TRUE) { + $hh = floor($value/3600); + $min = floor(($value-$hh*3600)/60); + $sec = $value-$hh*3600-$min*60; + $l = sprintf('%02d', $hh).':'.sprintf('%02d', $min); + if ($withSeconds) { + $l .= ':'.sprintf('%02d', $sec); + } + return $l; + } + + /** + * Returns the "age" in minutes / hours / days / years of the number of $seconds inputted. + * Usage: 15 + * + * @param integer $seconds could be the difference of a certain timestamp and time() + * @param string $labels should be something like ' min| hrs| days| yrs'. This value is typically delivered by this function call: $GLOBALS["LANG"]->sL("LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears") + * @return string Formatted time + */ + public static function calcAge($seconds, $labels = 'min|hrs|days|yrs') { + $labelArr = explode('|', $labels); + $prefix = ''; + if ($seconds<0) {$prefix = '-'; $seconds = abs($seconds);} + if ($seconds<3600) { + $seconds = round ($seconds/60).' '.trim($labelArr[0]); + } elseif ($seconds<24*3600) { + $seconds = round ($seconds/3600).' '.trim($labelArr[1]); + } elseif ($seconds<365*24*3600) { + $seconds = round ($seconds/(24*3600)).' '.trim($labelArr[2]); + } else { + $seconds = round ($seconds/(365*24*3600)).' '.trim($labelArr[3]); + } + return $prefix.$seconds; + } + + /** + * Returns a formatted timestamp if $tstamp is set. + * The date/datetime will be followed by the age in parenthesis. + * Usage: 3 + * + * @param integer Time stamp, seconds + * @param integer 1/-1 depending on polarity of age. + * @param string $date=="date" will yield "dd:mm:yy" formatting, otherwise "dd:mm:yy hh:mm" + * @return string + */ + public static function dateTimeAge($tstamp, $prefix = 1, $date = '') { + return $tstamp ? + ($date=='date' ? self::date($tstamp) : self::datetime($tstamp)) . + ' (' . self::calcAge($prefix * ($GLOBALS['EXEC_TIME'] - $tstamp), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) . ')' + : ''; + } +} +?> \ No newline at end of file Eigenschaftsänderungen: t3lib\utility\class.t3lib_utility_date.php ___________________________________________________________________ Hinzugefügt: svn:keywords + Date Author Revision Id HeadURL Hinzugefügt: svn:eol-style + native Index: typo3/alt_doc.php =================================================================== --- typo3/alt_doc.php (Revision 8042) +++ typo3/alt_doc.php (Arbeitskopie) @@ -883,7 +883,7 @@ if ($undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes)) { $aOnClick = 'window.location.href=\'show_rechis.php?element='.rawurlencode($this->firstEl['table'].':'.$this->firstEl['uid']).'&revert=ALL_FIELDS&sumUp=-1&returnUrl='.rawurlencode($this->R_URI).'\'; return false;'; $buttons['undo'] = '' . + ' title="' . htmlspecialchars(sprintf($LANG->getLL('undoLastChange'), t3lib_utility_Date::calcAge($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp'], $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-undo') . ''; } Index: typo3/logomenu.php =================================================================== --- typo3/logomenu.php (Revision 8042) +++ typo3/logomenu.php (Arbeitskopie) @@ -160,7 +160,7 @@ $elRow = t3lib_BEfunc::getRecord($row['tablename'],$row['recuid']); if (is_array($elRow)) { $items[] = array( - 'title' => t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($row['tablename'], $elRow), $GLOBALS['BE_USER']->uc['titleLen']) . ' - ' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $row['tstamp_MAX']), + 'title' => t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($row['tablename'], $elRow), $GLOBALS['BE_USER']->uc['titleLen']) . ' - ' . t3lib_utility_Date::calcAge($GLOBALS['EXEC_TIME'] - $row['tstamp_MAX']), 'icon' => array(t3lib_iconworks::getIcon($row['tablename'],$elRow),'width="18" height="16"'), 'onclick' => 'content.'.t3lib_BEfunc::editOnClick('&edit['.$row['tablename'].']['.$row['recuid'].']=edit','','dummy.php') ); Index: typo3/mod/user/ws/class.wslib_gui.php =================================================================== --- typo3/mod/user/ws/class.wslib_gui.php (Revision 8042) +++ typo3/mod/user/ws/class.wslib_gui.php (Arbeitskopie) @@ -844,7 +844,7 @@ $text = $LANG->getLL('stage_undefined'); break; } - $text = t3lib_BEfunc::datetime($dat['tstamp']).': ' . sprintf($text, htmlspecialchars($username)); + $text = t3lib_utility_Date::datetime($dat['tstamp']).': ' . sprintf($text, htmlspecialchars($username)); $text.= ($data['comment'] ? '
' . $LANG->getLL('stage_label_user_comment') . ' ' . htmlspecialchars($data['comment']) . '' : ''); $entry[] = $text; Index: typo3/mod/user/ws/index.php =================================================================== --- typo3/mod/user/ws/index.php (Revision 8042) +++ typo3/mod/user/ws/index.php (Arbeitskopie) @@ -707,9 +707,9 @@ '' . $LANG->getLL('workspace_list_label_frozen') . '' . '' . $LANG->getLL($wksp['freeze'] ? 'workspace_list_label_frozen_yes' : 'workspace_list_label_frozen_no') . '' . '' . $LANG->getLL('workspace_list_label_publish_date') . '' . - '' . ($wksp['publish_time'] == 0 ? ' –' : t3lib_BEfunc::datetime($wksp['publish_time'])) . '' . + '' . ($wksp['publish_time'] == 0 ? ' –' : t3lib_utility_Date::datetime($wksp['publish_time'])) . '' . '' . $LANG->getLL('workspace_list_label_unpublish_date') . '' . - '' . ($wksp['unpublish_time'] == 0 ? ' –' : t3lib_BEfunc::datetime($wksp['unpublish_time'])) . '' . + '' . ($wksp['unpublish_time'] == 0 ? ' –' : t3lib_utility_Date::datetime($wksp['unpublish_time'])) . '' . '' . $LANG->getLL('workspace_list_label_your_access') . '' . '' . $LANG->getLL('workspace_list_access_' . $wksp['_ACCESS']) . '' . '' . $LANG->getLL('workspace_list_label_workspace_users') . '' . Index: typo3/sysext/cms/layout/class.tx_cms_layout.php =================================================================== --- typo3/sysext/cms/layout/class.tx_cms_layout.php (Revision 8042) +++ typo3/sysext/cms/layout/class.tx_cms_layout.php (Arbeitskopie) @@ -1687,7 +1687,7 @@ if ($row['header_layout'] == 100) { $hiddenHeaderNote = ' [' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.hidden', true) . ']'; } - $outHeader= ($row['date'] ? htmlspecialchars($this->itemLabels['date'].' '.t3lib_BEfunc::date($row['date'])).'
':''). + $outHeader= ($row['date'] ? htmlspecialchars($this->itemLabels['date'].' '.t3lib_utility_Date::date($row['date'])).'
':''). '' . $this->linkEditContent($this->renderText($row['header']), $row) . $hiddenHeaderNote . '
'; } @@ -2140,8 +2140,8 @@ $theData = Array(); $theData['subject'] = t3lib_div::fixed_lgd_cs(htmlspecialchars($row['subject']),25).'   '; $theData['author'] = t3lib_div::fixed_lgd_cs(htmlspecialchars($row['author']),15).'   '; - $theData['date'] = t3lib_div::fixed_lgd_cs(t3lib_BEfunc::datetime($row['crdate']),20).'   '; - $theData['age'] = t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $row['crdate'], $this->agePrefixes) . '   '; + $theData['date'] = t3lib_div::fixed_lgd_cs(t3lib_utility_Date::datetime($row['crdate']),20).'   '; + $theData['age'] = t3lib_utility_Date::calcAge($GLOBALS['EXEC_TIME'] - $row['crdate'], $this->agePrefixes) . '   '; if ($re) { $theData['replys'] = $re; } @@ -2439,20 +2439,20 @@ // Created: $lines[] = array( $LANG->getLL('pI_crDate') . ':', - t3lib_BEfunc::datetime($rec['crdate']) . ' (' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $rec['crdate'], $this->agePrefixes) . ')', + t3lib_utility_Date::datetime($rec['crdate']) . ' (' . t3lib_utility_Date::calcAge($GLOBALS['EXEC_TIME'] - $rec['crdate'], $this->agePrefixes) . ')', ); // Last change: $lines[] = array( $LANG->getLL('pI_lastChange') . ':', - t3lib_BEfunc::datetime($rec['tstamp']) . ' (' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $rec['tstamp'],$this->agePrefixes) . ')', + t3lib_utility_Date::datetime($rec['tstamp']) . ' (' . t3lib_utility_Date::calcAge($GLOBALS['EXEC_TIME'] - $rec['tstamp'],$this->agePrefixes) . ')', ); // Last change of content: if ($rec['SYS_LASTCHANGED']) { $lines[] = array( $LANG->getLL('pI_lastChangeContent') . ':', - t3lib_BEfunc::datetime($rec['SYS_LASTCHANGED']) . ' (' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $rec['SYS_LASTCHANGED'], $this->agePrefixes) . ')', + t3lib_utility_Date::datetime($rec['SYS_LASTCHANGED']) . ' (' . t3lib_utility_Date::calcAge($GLOBALS['EXEC_TIME'] - $rec['SYS_LASTCHANGED'], $this->agePrefixes) . ')', ); } @@ -2479,7 +2479,7 @@ $rrow2 = $GLOBALS['TYPO3_DB']->sql_fetch_row($res); $lines[]=''; - $lines[]=array($LANG->getLL('pI_hitsPeriod').':',t3lib_BEfunc::date($rrow2[0]).' - '.t3lib_BEfunc::date($rrow2[1]).' ('.t3lib_BEfunc::calcAge($rrow2[1]-$rrow2[0],$this->agePrefixes).')'); + $lines[]=array($LANG->getLL('pI_hitsPeriod').':',t3lib_utility_Date::date($rrow2[0]).' - '.t3lib_utility_Date::date($rrow2[1]).' ('.t3lib_utility_Date::calcAge($rrow2[1]-$rrow2[0],$this->agePrefixes).')'); $lines[]=array($LANG->getLL('pI_hitsTotal').':',$rrow[0]); Index: typo3/sysext/cms/layout/db_layout.php =================================================================== --- typo3/sysext/cms/layout/db_layout.php (Revision 8042) +++ typo3/sysext/cms/layout/db_layout.php (Arbeitskopie) @@ -1268,7 +1268,7 @@ // Undo button $buttons['undo'] = '' . + title="' . htmlspecialchars(sprintf($LANG->getLL('undoLastChange'), t3lib_utility_Date::calcAge($GLOBALS['EXEC_TIME'] - $this->undoButtonR['tstamp'], $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-undo') . ''; Index: typo3/sysext/cms/web_info/class.tx_cms_webinfo.php =================================================================== --- typo3/sysext/cms/web_info/class.tx_cms_webinfo.php (Revision 8042) +++ typo3/sysext/cms/web_info/class.tx_cms_webinfo.php (Arbeitskopie) @@ -126,7 +126,7 @@ } $timespan_b = mktime (0,0,0); $timespan_e = mktime (0,0,0)-(30-1)*3600*24+1; - $header='
'.sprintf($LANG->getLL('stat_period'),t3lib_BEfunc::date($timespan_b),t3lib_BEfunc::date($timespan_e)).'
'; + $header='
'.sprintf($LANG->getLL('stat_period'),t3lib_utility_Date::date($timespan_b),t3lib_utility_Date::date($timespan_e)).'
'; // $dblist->start($this->pObj->id,'pages',0); Index: typo3/sysext/dbal/mod1/index.php =================================================================== --- typo3/sysext/dbal/mod1/index.php (Revision 8042) +++ typo3/sysext/dbal/mod1/index.php (Arbeitskopie) @@ -507,7 +507,7 @@ while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $tRows[] = ' - ' . t3lib_BEfunc::datetime($row['tstamp']) . ' + ' . t3lib_utility_Date::datetime($row['tstamp']) . ' ' . htmlspecialchars($row['script']) . ' ' . htmlspecialchars($row['tablename']) . ' ' . str_replace(array('\'\'', '""', 'IS NULL', 'IS NOT NULL'), array('\'\'', '""', 'IS NULL', 'IS NOT NULL'), htmlspecialchars($row['whereclause'])) . ' @@ -558,7 +558,7 @@ while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $tRows[] = ' - ' . t3lib_BEfunc::datetime($row['tstamp']) . ' + ' . t3lib_utility_Date::datetime($row['tstamp']) . ' ' . htmlspecialchars($row['qrycount']) . ' ' . ($row['error'] ? 'ERR' : '') . ' ' . htmlspecialchars($row['calc_sum']) . ' Index: typo3/sysext/indexed_search/mod/index.php =================================================================== --- typo3/sysext/indexed_search/mod/index.php (Revision 8042) +++ typo3/sysext/indexed_search/mod/index.php (Arbeitskopie) @@ -323,9 +323,9 @@ htmlentities(t3lib_div::fixed_lgd_cs($row["item_title"],30)), t3lib_div::formatSize($row["item_size"]), $this->getNumberOfWords($row["phash"]), - t3lib_BEfunc::datetime($row["item_mtime"]), - t3lib_BEfunc::datetime($row["crdate"]), - ($row["tstamp"]!=$row["crdate"] ? t3lib_BEfunc::datetime($row["tstamp"]) : ""), + t3lib_utility_Date::datetime($row["item_mtime"]), + t3lib_utility_Date::datetime($row["crdate"]), + ($row["tstamp"]!=$row["crdate"] ? t3lib_utility_Date::datetime($row["tstamp"]) : ""), $row["parsetime"], $this->getNumberOfSections($row["phash"])."/".$grListRec[0]["pcount"]."/".$this->getNumberOfFulltext($row["phash"]), $row["pcount"]."/".$this->formatFeGroup($grListRec), @@ -343,9 +343,9 @@ "", t3lib_div::formatSize($row2["item_size"]), $this->getNumberOfWords($row2["phash"]), - t3lib_BEfunc::datetime($row2["item_mtime"]), - t3lib_BEfunc::datetime($row2["crdate"]), - ($row2["tstamp"]!=$row2["crdate"] ? t3lib_BEfunc::datetime($row2["tstamp"]) : ""), + t3lib_utility_Date::datetime($row2["item_mtime"]), + t3lib_utility_Date::datetime($row2["crdate"]), + ($row2["tstamp"]!=$row2["crdate"] ? t3lib_utility_Date::datetime($row2["tstamp"]) : ""), $row2["parsetime"], $this->getNumberOfSections($row2["phash"])."/".$grListRec[0]["pcount"]."/".$this->getNumberOfFulltext($row2["phash"]), "-/".$this->formatFeGroup($grListRec), @@ -390,9 +390,9 @@ htmlentities(t3lib_div::fixed_lgd_cs($row["item_title"],30)), t3lib_div::formatSize($row["item_size"]), $this->getNumberOfWords($row["phash"]), - t3lib_BEfunc::datetime($row["item_mtime"]), - t3lib_BEfunc::datetime($row["crdate"]), - ($row["tstamp"]!=$row["crdate"] ? t3lib_BEfunc::datetime($row["tstamp"]) : ""), + t3lib_utility_Date::datetime($row["item_mtime"]), + t3lib_utility_Date::datetime($row["crdate"]), + ($row["tstamp"]!=$row["crdate"] ? t3lib_utility_Date::datetime($row["tstamp"]) : ""), $row["parsetime"], $this->getNumberOfSections($row["phash"])."/".$grListRec[0]["pcount"]."/".$this->getNumberOfFulltext($row["phash"]), $row["pcount"], @@ -411,8 +411,8 @@ "", $this->getNumberOfWords($row2["phash"]), "", - t3lib_BEfunc::datetime($row2["crdate"]), - ($row2["tstamp"]!=$row2["crdate"] ? t3lib_BEfunc::datetime($row2["tstamp"]) : ""), + t3lib_utility_Date::datetime($row2["crdate"]), + ($row2["tstamp"]!=$row2["crdate"] ? t3lib_utility_Date::datetime($row2["tstamp"]) : ""), $row2["parsetime"], $this->getNumberOfSections($row2["phash"])."/".$grListRec[0]["pcount"]."/".$this->getNumberOfFulltext($row2["phash"]), "", Index: typo3/sysext/indexed_search/modfunc1/class.tx_indexedsearch_modfunc1.php =================================================================== --- typo3/sysext/indexed_search/modfunc1/class.tx_indexedsearch_modfunc1.php (Revision 8042) +++ typo3/sysext/indexed_search/modfunc1/class.tx_indexedsearch_modfunc1.php (Arbeitskopie) @@ -515,7 +515,7 @@ $lines[] = ''.htmlspecialchars($this->utf8_to_currentCharset($row['item_description'])).'...'; $lines[] = ''.t3lib_div::formatSize($row['item_size']).''; - $lines[] = ''.t3lib_BEfunc::dateTimeAge($row['tstamp']).''; + $lines[] = ''.t3lib_utility_Date::dateTimeAge($row['tstamp']).''; break; } Index: typo3/sysext/lowlevel/clmods/class.syslog.php =================================================================== --- typo3/sysext/lowlevel/clmods/class.syslog.php (Revision 8042) +++ typo3/sysext/lowlevel/clmods/class.syslog.php (Arbeitskopie) @@ -98,7 +98,7 @@ ); foreach($rows as $r) { $l = unserialize($r['log_data']); - $explained = '#'.$r['uid'].' '.t3lib_BEfunc::datetime($r['tstamp']).' USER['.$r['userid'].']: '.sprintf($r['details'],$l[0],$l[1],$l[2],$l[3],$l[4],$l[5]); + $explained = '#'.$r['uid'].' '.t3lib_utility_Date::datetime($r['tstamp']).' USER['.$r['userid'].']: '.sprintf($r['details'],$l[0],$l[1],$l[2],$l[3],$l[4],$l[5]); $resultArray['listing'][$r['uid']] = $explained; $resultArray['allDetails'][$r['uid']] = array($explained,t3lib_div::arrayToLogString($r,'uid,userid,action,recuid,tablename,recpid,error,tstamp,type,details_nr,IP,event_pid,NEWid,workspace')); } Index: typo3/sysext/sys_action/task/class.tx_sysaction_task.php =================================================================== --- typo3/sysext/sys_action/task/class.tx_sysaction_task.php (Revision 8042) +++ typo3/sysext/sys_action/task/class.tx_sysaction_task.php (Arbeitskopie) @@ -765,7 +765,7 @@ $title = t3lib_BEfunc::getRecordTitle($el['table'], $dbAnalysis->results[$el['table']][$el['id']]); $description = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$el['table']]['ctrl']['title'], 1); if (isset($record['crdate'])) { // @todo: which information could be needfull - $description .= ' - ' . t3lib_BEfunc::dateTimeAge($record['crdate']); + $description .= ' - ' . t3lib_utility_Date::dateTimeAge($record['crdate']); } $actionList[$el['id']] = array( Index: typo3/wizard_rte.php =================================================================== --- typo3/wizard_rte.php (Revision 8042) +++ typo3/wizard_rte.php (Arbeitskopie) @@ -282,7 +282,7 @@ // Undo/Revert: if ($undoButton) { $buttons['undo'] = '' . - 'doc->backPath, 'gfx/undo.gif') . ' class="c-inputButton" title="' . htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('rte_undoLastChange'), t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) . '" alt="" />' . + 'doc->backPath, 'gfx/undo.gif') . ' class="c-inputButton" title="' . htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('rte_undoLastChange'), t3lib_utility_Date::calcAge($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) . '" alt="" />' . ''; }