diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index be196fc52c9..3f3a63a2985 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -755,7 +755,7 @@ else // View by day if ($today) $style='cal_today'; $timestamp=dol_mktime(12,0,0,$month,$day,$year); - $arraytimestamp=adodb_getdate(dol_mktime(12,0,0,$month,$day,$year)); + $arraytimestamp=dol_getdate($timestamp); echo ''; echo ' '; echo ' \n"; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 8cc9a91858e..16d76cc0ee5 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -163,21 +163,6 @@ if ($socid) $sql.= " AND f.fk_soc = ".$socid; $sql.= " GROUP BY s.nom, s.rowid"; $sql.= " ORDER BY s.nom"; -/* - print dol_print_date($date_end,'dayhour',true).'
'; - print $db->idate($date_end).'
'; - - print adodb_get_gmt_diff(); - print adodb_date('Y-d-m H:i',$date_end,true).'
'; - print adodb_date('Y-d-m H:i',$date_end,false).'
'; - - $date_end=0; - print dol_print_date($date_end,'dayhour',true).'
'; - print $db->idate($date_end).'
'; - print adodb_gmstrftime('%Y-%d-%m %H:%M',$date_end).'
'; - print $sql; - */ - dol_syslog("get customer invoices sql=".$sql); $result = $db->query($sql); if ($result) { diff --git a/htdocs/core/datepicker.php b/htdocs/core/datepicker.php index 0581f9762ae..dca5f86b829 100644 --- a/htdocs/core/datepicker.php +++ b/htdocs/core/datepicker.php @@ -22,7 +22,7 @@ /** * \file htdocs/core/datepicker.php - * \brief Fichier de gestion de la popup de selection de date eldy + * \brief File to manage popup date selector */ if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language @@ -124,7 +124,8 @@ function xyzToUnixTimestamp($mysqldate){ return $unixtimestamp; } -function displayBox($selectedDate,$month,$year){ +function displayBox($selectedDate,$month,$year) +{ global $langs,$conf; //print "$selectedDate,$month,$year"; @@ -135,7 +136,7 @@ function displayBox($selectedDate,$month,$year){ if($selectedDate != "00000000") { $selDate=xyzToUnixTimestamp($selectedDate); - $xyz=dol_date("Ymd",$selDate); + $xyz=dol_print_date($selDate,"%Y%m%d"); } else { @@ -148,7 +149,7 @@ function displayBox($selectedDate,$month,$year){ + onClick="loadMonth('','','','','defaultlang ?>')">"; $cols++; @@ -249,7 +250,7 @@ function displayBox($selectedDate,$month,$year){ if($selDate) { $tempDate=dol_getdate($selDate); - print $langs->trans($selectMonth)." "; + print $langs->trans("Month".$selectMonth)." "; print sprintf("%02s",$tempDate["mday"]); print ", ".$selectYear; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index c14e8541e49..be0cd605343 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1085,41 +1085,6 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1,$ } -/* For backward compatibility */ -function dolibarr_date($fmt, $timestamp, $gm=false) -{ - return dol_date($fmt, $timestamp, $gm); -} - -/** - * Returns formated date - * - * @param string $fmt Format (Exemple: 'Y-m-d H:i:s') - * @param timestamp $timestamp Date. Example: If timestamp=0 and gm=1, return 01/01/1970 00:00:00 - * @param boolean $gm 1 if timestamp was built with gmmktime, 0 if timestamp was build with mktime - * @return string Formated date - * - * @deprecated Replaced by dol_print_date - */ -function dol_date($fmt, $timestamp, $gm=false) -{ - $usealternatemethod=false; - if ($timestamp <= 0) $usealternatemethod=true; - if ($timestamp >= 2145913200) $usealternatemethod=true; - - if ($usealternatemethod || $gm) // Si time gm, seule adodb peut convertir - { - $string=adodb_date($fmt,$timestamp,$gm); - } - else - { - $string=date($fmt,$timestamp); - } - - return $string; -} - - /** * Return string with formated size * diff --git a/htdocs/index.php b/htdocs/index.php index 2d0eca51a78..9804a46d7e0 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -571,11 +571,10 @@ if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) } } +llxFooter(); $db->close(); -llxFooter(); - /** * Show weather logo. Logo to show depends on $totallate and values for
'.$langs->trans("Day".$arraytimestamp['wday'])."trans($selectMonth).", ".$selectYear; + echo $langs->trans("Month".$selectMonth).", ".$selectYear; ?> ','','defaultlang ?>')"> ','','','defaultlang ?>')">> trans("FormatDateShortJava")."')\""; + echo " onMouseOver=\"dpHighlightDay(".$mydate["year"].",".dol_print_date($thedate,"%m").",".$mydate["mday"].",tradMonths)\""; + echo " onClick=\"dpClickDay(".$mydate["year"].",".dol_print_date($thedate,"%m").",".$mydate["mday"].",'".$langs->trans("FormatDateShortJava")."')\""; echo ">".sprintf("%02s",$mydate["mday"])."