diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php
index 1e8670d8aef..d74697dd304 100644
--- a/htdocs/adherents/card_subscriptions.php
+++ b/htdocs/adherents/card_subscriptions.php
@@ -452,7 +452,7 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer)
print '
'.$langs->trans("Label").' ';
print ' ';
+ print dolibarr_print_date(($datefrom?$datefrom:time()),"%Y").'" >';
}
print ''.$langs->trans("SendAcknowledgementByMail").' ';
diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php
index fc6d0e045ca..9cf292e42e5 100644
--- a/htdocs/adherents/cotisations.php
+++ b/htdocs/adherents/cotisations.php
@@ -226,7 +226,7 @@ if ($result)
print '';
if ($allowinsertbankafter && $user->rights->banque->modifier && ! $objp->fk_account && $conf->banque->enabled && $conf->global->ADHERENT_BANK_USE && $objp->cotisation)
{
- print " trans("Subscriptions").' '.strftime("%Y",$objp->dateadh)."\" >\n";
+ print " trans("Subscriptions").' '.dolibarr_print_date($objp->dateadh,"%Y")."\" >\n";
// print " ";
// print " ";
print ' ';
diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php
index 6115986a983..533d32ec65d 100644
--- a/htdocs/adherents/index.php
+++ b/htdocs/adherents/index.php
@@ -254,7 +254,7 @@ if ($result)
while ($i < $num)
{
$objp = $db->fetch_object($result);
- $year=strftime("%Y",$objp->dateadh);
+ $year=dolibarr_print_date($objp->dateadh,"%Y");
$Total[$year]+=$objp->cotisation;
$Number[$year]+=1;
$tot+=$objp->cotisation;
diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php
index a3556924796..56d66061712 100644
--- a/htdocs/comm/fiche.php
+++ b/htdocs/comm/fiche.php
@@ -140,7 +140,6 @@ if ($socid > 0)
$objsoc->id=$socid;
$objsoc->fetch($socid,$to);
- $dac = strftime("%Y-%m-%d %H:%M", time());
if ($errmesg)
{
print "$errmesg ";
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index ad6a89df976..e9c92e231ec 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -2024,14 +2024,15 @@ else
// Date propale
print '';
- $y = strftime('%Y',$objp->dp);
- $m = strftime('%m',$objp->dp);
-
- print strftime('%d',$objp->dp)."\n";
+ $y = dolibarr_print_date($objp->dp,'%Y');
+ $m = dolibarr_print_date($objp->dp,'%m');
+ $mt= dolibarr_print_date($objp->dp,'%b');
+ $d = dolibarr_print_date($objp->dp,'%d');
+ print $d."\n";
print ' ';
- print dolibarr_print_date($objp->dp,'%b')." \n";
+ print $mt."\n";
print ' ';
- print strftime('%Y',$objp->dp)." \n";
+ print $y."\n";
// Date fin validite
if ($objp->dfv)
diff --git a/htdocs/comm/propal/stats/month.php b/htdocs/comm/propal/stats/month.php
index bc4f1211479..dde41bd2848 100644
--- a/htdocs/comm/propal/stats/month.php
+++ b/htdocs/comm/propal/stats/month.php
@@ -125,7 +125,7 @@ $data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
- $data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
+ $data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
}
if (!$user->rights->societe->client->voir || $user->societe_id)
diff --git a/htdocs/commande/stats/month.php b/htdocs/commande/stats/month.php
index 7a729cdb599..f506caae1f3 100644
--- a/htdocs/commande/stats/month.php
+++ b/htdocs/commande/stats/month.php
@@ -140,7 +140,7 @@ $data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
- $data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
+ $data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
}
if (!$user->rights->societe->client->voir || $user->societe_id)
diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php
index eef574ad600..c213bc793d5 100644
--- a/htdocs/compta/bank/graph.php
+++ b/htdocs/compta/bank/graph.php
@@ -50,9 +50,9 @@ if ($_GET["account"] || $_GET["ref"])
if (! empty($_GET["lib"])) $conf->global->MAIN_GRAPH_LIBRARY=$_GET["lib"];
$datetime = time();
- $year = strftime("%Y", $datetime);
- $month = strftime("%m", $datetime);
- $day = strftime("%d", $datetime);
+ $year = dolibarr_print_date($datetime, "%Y");
+ $month = dolibarr_print_date($datetime, "%m");
+ $day = dolibarr_print_date($datetime, "%d");
if (! empty($_GET["year"])) $year=sprintf("%04d",$_GET["year"]);
if (! empty($_GET["month"])) $month=sprintf("%02d",$_GET["month"]);
@@ -166,7 +166,6 @@ if ($_GET["account"] || $_GET["ref"])
$i = 0;
while ($xmonth == $month)
{
- //print strftime ("%e %d %m %y",$day)."\n";
$subtotal = $subtotal + (isset($amounts[$textdate]) ? $amounts[$textdate] : 0);
if ($day > time())
{
@@ -601,7 +600,7 @@ if ($_GET["account"] || $_GET["ref"])
{
$data_credit[$i] = isset($credits[substr("0".($i+1),-2)]) ? $credits[substr("0".($i+1),-2)] : 0;
$data_debit[$i] = isset($debits[substr("0".($i+1),-2)]) ? $debits[substr("0".($i+1),-2)] : 0;
- $labels[$i] = strftime("%b",dolibarr_mktime(12,0,0,$i+1,1,2000));
+ $labels[$i] = dolibarr_print_date(dolibarr_mktime(12,0,0,$i+1,1,2000),"%b");
$datamin[$i] = $acct->min_desired;
}
diff --git a/htdocs/compta/commande/liste.php b/htdocs/compta/commande/liste.php
index d2cabdc2216..22277bf0b32 100644
--- a/htdocs/compta/commande/liste.php
+++ b/htdocs/compta/commande/liste.php
@@ -158,14 +158,15 @@ if ($resql)
print "";
print "";
- $y = strftime("%Y",$objp->date_commande);
- $m = strftime("%m",$objp->date_commande);
-
- print strftime("%d",$objp->date_commande)."\n";
+ $y = dolibarr_print_date($objp->date_commande,"%Y");
+ $m = dolibarr_print_date($objp->date_commande,"%m");
+ $mt = dolibarr_print_date($objp->date_commande,"%b");
+ $d = dolibarr_print_date($objp->date_commande,"%d");
+ print $d."\n";
print " ";
- print strftime("%B",$objp->date_commande)." \n";
+ print $mt."\n";
print " ";
- print strftime("%Y",$objp->date_commande)." \n";
+ print $y."\n";
print ''.$generic_commande->LibStatut($objp->fk_statut,$objp->facture,5).' ';
print " \n";
diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php
index 3992e5cbda9..815ea416ecd 100644
--- a/htdocs/compta/facture/apercu.php
+++ b/htdocs/compta/facture/apercu.php
@@ -166,7 +166,7 @@ if ($_GET["facid"] > 0)
print ''.$fac->ref.'-detail.pdf ';
print ''.filesize($filedetail). ' bytes ';
- print ''.strftime("%d %b %Y %H:%M:%S",filemtime($filedetail)).' ';
+ print ''.dolibarr_print_date(filemtime($filedetail),"%d %b %Y %H:%M:%S").' ';
print '';
}
diff --git a/htdocs/compta/facture/stats/month.php b/htdocs/compta/facture/stats/month.php
index e0874eae705..82907b53649 100644
--- a/htdocs/compta/facture/stats/month.php
+++ b/htdocs/compta/facture/stats/month.php
@@ -124,7 +124,7 @@ $data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
- $data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
+ $data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
}
$filename_avg = $dir."/invoicesaverage-".$year.".png";
diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php
index 2b2e87a2d58..53461ea3144 100644
--- a/htdocs/compta/propal.php
+++ b/htdocs/compta/propal.php
@@ -777,13 +777,15 @@ else
// Date
print "";
- $y = strftime("%Y",$objp->dp);
- $m = strftime("%m",$objp->dp);
- print strftime("%d",$objp->dp)."\n";
+ $y = dolibarr_print_date($objp->dp,"%Y");
+ $m = dolibarr_print_date($objp->dp,"%m");
+ $mt = dolibarr_print_date($objp->dp,"%b");
+ $d = dolibarr_print_date($objp->dp,"%d");
+ print $d."\n";
print " ";
- print strftime("%B",$objp->dp)." \n";
+ print $b."\n";
print " ";
- print strftime("%Y",$objp->dp)." \n";
+ print $y."\n";
// Prix
print "".price($objp->total_ht)." \n";
diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php
index 09890fdc1c4..b2bca3bc756 100644
--- a/htdocs/compta/resultat/index.php
+++ b/htdocs/compta/resultat/index.php
@@ -495,7 +495,7 @@ for ($mois = 1 ; $mois <= 12 ; $mois++)
{
$var=!$var;
print '';
- print "".strftime("%B",dolibarr_mktime(12,0,0,$mois,1,$annee))." ";
+ print "".dolibarr_print_date(dolibarr_mktime(12,0,0,$mois,1,$annee),"%b")." ";
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
$case = strftime("%Y-%m",dolibarr_mktime(12,0,0,$mois,1,$annee));
diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php
index 4f3af0eecf4..8e19643ab0b 100644
--- a/htdocs/compta/sociales/charges.php
+++ b/htdocs/compta/sociales/charges.php
@@ -284,7 +284,7 @@ if ($chid > 0)
print "";
if ($cha->paye==0 && $_GET['action'] == 'edit')
{
- print " periode)."\"> (YYYYMMDD)";
+ print " periode,"%Y%m%d")."\"> (YYYYMMDD)";
}
else
{
diff --git a/htdocs/compta/stats/comp.php b/htdocs/compta/stats/comp.php
index 981c9727edb..90c0b899557 100644
--- a/htdocs/compta/stats/comp.php
+++ b/htdocs/compta/stats/comp.php
@@ -188,7 +188,7 @@ function pt ($db, $sql, $year) {
if ($obj->dm > $month ) {
for ($b = $month ; $b < $obj->dm ; $b++) {
print " ";
- print "".strftime("%B",mktime(12,0,0,$b, 1, $year))." \n";
+ print "".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")." \n";
print "0 \n";
print " \n";
$var=!$var;
@@ -199,7 +199,7 @@ function pt ($db, $sql, $year) {
if ($obj->sum > 0) {
print "";
print "dm\">";
- print strftime("%B",mktime(12,0,0,$obj->dm, 1, $year))." \n";
+ print dolibarr_print_date(dolibarr_mktime(12,0,0,$obj->dm, 1, $year),"%b")."\n";
print "".price($obj->sum)." \n";
print " \n";
@@ -220,7 +220,7 @@ function pt ($db, $sql, $year) {
for ($b = $beg + 1 ; $b < 13 ; $b++) {
$var=!$var;
print "";
- print "".strftime("%B",mktime(12,0,0,$b, 1, $year))." \n";
+ print "".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")." \n";
print "0 \n";
print " \n";
$ca[$b] = 0;
@@ -295,7 +295,7 @@ function ppt ($db, $year, $socid)
$delta = $ca[$b] - $prev[$b];
$deltat = $deltat + $delta ;
print "";
- print "".strftime("%B",mktime(12,0,0,$b, 1, $year))." \n";
+ print "".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")." \n";
print "".price($delta)." \n";
print " \n";
}
diff --git a/htdocs/compta/stats/exercices.php b/htdocs/compta/stats/exercices.php
index d1dbe171c49..fb8ff3d1cc8 100644
--- a/htdocs/compta/stats/exercices.php
+++ b/htdocs/compta/stats/exercices.php
@@ -123,7 +123,7 @@ function pt ($db, $sql, $year) {
if ($obj->dm > $month ) {
for ($b = $month ; $b < $obj->dm ; $b++) {
print "";
- print "".strftime("%B",mktime(12,0,0,$b, 1, $year))." \n";
+ print "".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")." \n";
print "0 \n";
print " \n";
$var=!$var;
@@ -134,7 +134,7 @@ function pt ($db, $sql, $year) {
if ($obj->sum > 0) {
print "";
print "";
- print strftime("%B",mktime(12,0,0,$obj->dm, 1, $year))." \n";
+ print dolibarr_print_date(dolibarr_mktime(12,0,0,$obj->dm, 1, $year),"%b")."\n";
print "".price($obj->sum)." \n";
print " \n";
@@ -155,7 +155,7 @@ function pt ($db, $sql, $year) {
for ($b = $beg + 1 ; $b < 13 ; $b++) {
$var=!$var;
print "";
- print "".strftime("%B",mktime(12,0,0,$b, 1, $year))." \n";
+ print "".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")." \n";
print "0 \n";
print " \n";
$ca[$b] = 0;
@@ -234,7 +234,7 @@ function ppt ($db, $year, $socid)
$delta = $ca[$b] - $prev[$b];
$deltat = $deltat + $delta ;
print "";
- print "".strftime("%B",mktime(12,0,0,$b, 1, $year))." \n";
+ print "".dolibarr_print_date(dolibarr_mktime(12,0,0,$b, 1, $year),"%b")." \n";
print "".price($delta)." \n";
print "".price($deltat)." \n";
print " \n";
@@ -255,5 +255,5 @@ ppt($db, $cyear, $socid);
$db->close();
-llxFooter('$Date$ révision $Revision$');
+llxFooter('$Date$ - $Revision$');
?>
diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php
index 3c6e39af39b..b6ffb981c6a 100644
--- a/htdocs/compta/stats/index.php
+++ b/htdocs/compta/stats/index.php
@@ -177,12 +177,12 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
$var=!$var;
print "";
- print "".strftime("%B",mktime(1,1,1,$mois,1,2000))." ";
+ print "".dolibarr_print_date(dolibarr_mktime(12,0,0,$mois,1,2000),"%b")." ";
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
- $casenow = strftime("%Y-%m",mktime());
- $case = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee));
- $caseprev = strftime("%Y-%m",mktime(1,1,1,$mois,1,$annee-1));
+ $casenow = dolibarr_print_date(mktime(),"%Y-%m");
+ $case = dolibarr_print_date(mktime(1,1,1,$mois,1,$annee),"%Y-%m");
+ $caseprev = dolibarr_print_date(mktime(1,1,1,$mois,1,$annee-1),"%Y-%m");
if ($annee == $year_current) {
$total_CA += $cum[$case];
diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php
index 984a8675afe..38eedc8b546 100644
--- a/htdocs/compta/tva/index.php
+++ b/htdocs/compta/tva/index.php
@@ -248,7 +248,7 @@ if ($conf->compta->mode == "CREANCES-DETTES")
{
$var=!$var;
print " ";
- print ''.strftime("%b %Y",dolibarr_mktime(0,0,0,$m,1,$y)).' ';
+ print ''.dolibarr_print_date(dolibarr_mktime(0,0,0,$m,1,$y),"%b %Y").' ';
$x_coll = tva_coll($db, $y, $m);
print "".price($x_coll)." ";
diff --git a/htdocs/compta/tva/quadri.php b/htdocs/compta/tva/quadri.php
index 0901ee4b1b8..81404305ad0 100644
--- a/htdocs/compta/tva/quadri.php
+++ b/htdocs/compta/tva/quadri.php
@@ -217,7 +217,7 @@ if ($conf->compta->mode == "CREANCES-DETTES")
$subtot_paye_vat = 0;
for ($q = 1 ; $q <= 4 ; $q++ )
{
- print " ".$langs->trans("Quadri")." $q (".strftime("%b %Y",mktime(0,0,0,(($q-1)*3)+1,1,$y)).' - '.strftime("%b %Y",mktime(0,0,0,($q*3),1,$y)).") ";
+ print "".$langs->trans("Quadri")." $q (".dolibarr_print_date(dolibarr_mktime(0,0,0,(($q-1)*3)+1,1,$y),"%b %Y").' - '.dolibarr_print_date(dolibarr_mktime(0,0,0,($q*3),1,$y),"%b %Y").") ";
$var=true;
$x_coll = tva_coll($db, $y, $q);
diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php
index 346d72f407e..d772fe9cb2b 100644
--- a/htdocs/compta/tva/quadri_detail.php
+++ b/htdocs/compta/tva/quadri_detail.php
@@ -84,7 +84,7 @@ if ($modetax==1) // Caluclate on invoice for goods and services
{
$nom=$langs->trans("VATReportByQuartersInDueDebtMode");
$nom.=' ('.$langs->trans("SeeVATReportInInputOutputMode",'',' ').')';
- $period=$year_start.' - '.$langs->trans("Quadri")." $q (".strftime("%b %Y",dolibarr_mktime(12,0,0,(($q-1)*3)+1,1,$year_start)).' - '.strftime("%b %Y",dolibarr_mktime(12,0,0,($q*3),1,$year_start)).")";
+ $period=$year_start.' - '.$langs->trans("Quadri")." $q (".dolibarr_print_date(dolibarr_mktime(12,0,0,(($q-1)*3)+1,1,$year_start),"%b %Y").' - '.dolibarr_print_date(dolibarr_mktime(12,0,0,($q*3),1,$year_start),"%b %Y").")";
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }
@@ -113,7 +113,7 @@ if ($modetax==0) // Invoice for goods, payment for services
{
$nom=$langs->trans("VATReportByQuartersInInputOutputMode");
$nom.=' ('.$langs->trans("SeeVATReportInDueDebtMode",'',' ').')';
- $period=$year_start.' - '.$langs->trans("Quadri")." $q (".strftime("%b %Y",dolibarr_mktime(12,0,0,(($q-1)*3)+1,1,$year_start)).' - '.strftime("%b %Y",dolibarr_mktime(12,0,0,($q*3),1,$year_start)).")";
+ $period=$year_start.' - '.$langs->trans("Quadri")." $q (".dolibarr_print_date(dolibarr_mktime(12,0,0,(($q-1)*3)+1,1,$year_start),"%b %Y").' - '.dolibarr_print_date(dolibarr_mktime(12,0,0,($q*3),1,$year_start),"%b %Y").")";
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }
diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php
index abf3072f113..d4caa58909a 100644
--- a/htdocs/contrat/fiche.php
+++ b/htdocs/contrat/fiche.php
@@ -968,7 +968,7 @@ else
//print ' ';
$dateactstart = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
$dateactend = dolibarr_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]);
- $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",strftime("%A %d %B %Y", $dateactstart)),"confirm_active");
+ $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dolibarr_print_date($dateactstart,"%A %d %B %Y")),"confirm_active");
print '';
}
@@ -980,7 +980,7 @@ else
//print ' ';
$dateactstart = dolibarr_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
$dateactend = dolibarr_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]);
- $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("CloseService"),$langs->trans("ConfirmCloseService",strftime("%A %d %B %Y", $dateactend)),"confirm_closeline");
+ $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend,$langs->trans("CloseService"),$langs->trans("ConfirmCloseService",dolibarr_print_date($dateactend,"%A %d %B %Y")),"confirm_closeline");
print '';
}
diff --git a/htdocs/docs/class/courrier-droit-editeur.class.php b/htdocs/docs/class/courrier-droit-editeur.class.php
index 4824a18cbe1..9971ce23415 100644
--- a/htdocs/docs/class/courrier-droit-editeur.class.php
+++ b/htdocs/docs/class/courrier-droit-editeur.class.php
@@ -48,7 +48,7 @@ class pdf_courrier_droit_editeur
$this->marge_haute=10;
$this->marge_basse=10;
- $this->name = "Courrier des droits ".strftime("%Y", time());
+ $this->name = "Courrier des droits ".dolibarr_print_date(time(),"%Y");
$this->file = '1'.strftime("%Y", time()).'.pdf';
}
diff --git a/htdocs/expedition/liste.php b/htdocs/expedition/liste.php
index a2836786428..6ad91371779 100644
--- a/htdocs/expedition/liste.php
+++ b/htdocs/expedition/liste.php
@@ -149,14 +149,15 @@ if ($resql)
}
print "";
- $y = strftime("%Y",$objp->date_expedition);
- $m = strftime("%m",$objp->date_expedition);
-
- print strftime("%d",$objp->date_expedition)."\n";
+ $y = dolibarr_print_date($objp->date_expedition,"%Y");
+ $m = dolibarr_print_date($objp->date_expedition,"%m");
+ $mt = dolibarr_print_date($objp->date_expedition,"%b");
+ $d = dolibarr_print_date($objp->date_expedition,"%d");
+ print $d."\n";
print " ";
- print strftime("%B",$objp->date_expedition)." \n";
+ print $b."\n";
print " ";
- print strftime("%Y",$objp->date_expedition)." \n";
+ print $y."\n";
print ''.$expedition->LibStatut($objp->fk_statut,5).' ';
print "\n";
diff --git a/htdocs/expedition/stats/expeditionstats.class.php b/htdocs/expedition/stats/expeditionstats.class.php
index 9059575975f..47a0fbbe138 100644
--- a/htdocs/expedition/stats/expeditionstats.class.php
+++ b/htdocs/expedition/stats/expeditionstats.class.php
@@ -85,7 +85,7 @@ class ExpeditionStats
for ($i = 1 ; $i < 13 ; $i++)
{
- $data[$i-1] = array(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)), $res[$i]);
+ $data[$i-1] = array(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"), $res[$i]);
}
return $data;
@@ -101,7 +101,7 @@ class ExpeditionStats
for ($i = 1 ; $i < 13 ; $i++)
{
- $data[$i-1] = array(strftime("%b",dolibarr_mktime(12,12,12,$i,1,$year)),
+ $data[$i-1] = array(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),
$data1[$i][1],
$data2[$i][1]);
}
diff --git a/htdocs/fichinter/rapport.php b/htdocs/fichinter/rapport.php
index 1b13d009111..8fde011fb7c 100644
--- a/htdocs/fichinter/rapport.php
+++ b/htdocs/fichinter/rapport.php
@@ -93,7 +93,7 @@ $sql .= " ORDER BY $sortfield $sortorder ";
if ( $db->query($sql) )
{
$num = $db->num_rows();
- $title = "Rapport d'activité de " . strftime("%B %Y",strtotime ($start));
+ $title = $langs->trans("Report")." ".dolibarr_print_date(strtotime($start),"%B %Y");
print_barre_liste($title, $page, "rapport.php","&socid=$socid",$sortfield,$sortorder,'',$num);
$i = 0;
@@ -124,7 +124,7 @@ if ( $db->query($sql) )
print "rowid.$filter."\">".$objp->nom." \n";
}
print ''.nl2br($objp->description).' ';
- print "".strftime("%d %B %Y",$objp->dp)." \n";
+ print "".dolibarr_print_date($objp->dp,"%d %B %Y")." \n";
print ''.sprintf("%.1f",$objp->duree).' ';
$DureeTotal += $objp->duree;
print "\n";
diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php
index 3a63e06b949..255b4f4d7c7 100644
--- a/htdocs/lib/functions.lib.php
+++ b/htdocs/lib/functions.lib.php
@@ -2400,13 +2400,13 @@ function create_exdir($dir)
/**
- \brief Retourne le num�ro de la semaine par rapport a une date
+ \brief Retourne le numero de la semaine par rapport a une date
\param time Date au format 'timestamp'
- \return int Num�ro de semaine
+ \return int Numero de semaine
*/
function numero_semaine($time)
{
- $stime = strftime( '%Y-%m-%d',$time);
+ $stime = strftime('%Y-%m-%d',$time);
if (eregi('^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?',$stime,$reg))
{
diff --git a/htdocs/product.class.php b/htdocs/product.class.php
index b53f70c6c20..0f2f308b9a1 100644
--- a/htdocs/product.class.php
+++ b/htdocs/product.class.php
@@ -1418,7 +1418,7 @@ class Product extends CommonObject
for ($j = 0 ; $j < 12 ; $j++)
{
- $idx=ucfirst(substr( strftime("%b",mktime(12,0,0,$month,1,$year)) ,0,3) );
+ $idx=ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$month,1,$year),"%b") ,0,3) );
$monthnum=sprintf("%02s",$month);
$result[$j] = array($idx,isset($tab[$year.$month])?$tab[$year.$month]:0);
diff --git a/htdocs/stats.class.php b/htdocs/stats.class.php
index 529d9ae51f8..2b329c61ffb 100644
--- a/htdocs/stats.class.php
+++ b/htdocs/stats.class.php
@@ -196,7 +196,7 @@ class Stats
for ($i = 1 ; $i < 13 ; $i++)
{
- $data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,0,0,$i,1,$year)),0,3)), $res[$i]);
+ $data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
}
return $data;
@@ -236,7 +236,7 @@ class Stats
for ($i = 1 ; $i < 13 ; $i++)
{
- $data[$i-1] = array(ucfirst(substr(strftime("%b",dolibarr_mktime(12,0,0,$i,1,$year)),0,3)), $res[$i]);
+ $data[$i-1] = array(ucfirst(substr(dolibarr_print_date(dolibarr_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
}
return $data;
diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php
index c5e057974db..f8dea38d4a2 100644
--- a/htdocs/translate.class.php
+++ b/htdocs/translate.class.php
@@ -163,7 +163,7 @@ class Translate {
* \brief Load in a memory array, translation key-value for a particular file.
* If data for file already loaded, do nothing.
* All data in translation array are stored in ISO-8859-1 format.
- * \param domain File name to load (.lang file)
+ * \param domain File name to load (.lang file). Use @ before value if domain is in a module directory.
* \param alt Use alternate file even if file in target language is found
* \return int <0 if KO, >0 if OK
* \remarks tab_loaded is completed with $domain key.