Changeset 60058 in spip-zone


Ignore:
Timestamp:
Apr 3, 2012, 5:14:26 PM (7 years ago)
Author:
cedric@…
Message:

format_mysql_date est un simple appel a sql_format_date

Location:
_core_/plugins/grenier
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _core_/plugins/grenier/inc/date.php

    r44699 r60058  
    2222// http://doc.spip.org/@format_mysql_date
    2323function format_mysql_date($annee=0, $mois=0, $jour=0, $h=0, $m=0, $s=0) {
    24         $annee = sprintf("%04s",$annee);
    25         $mois = sprintf("%02s",$mois);
    26 
    27         if ($annee == "0000") $mois = 0;
    28         if ($mois == "00") $jour = 0;
    29 
    30         return sprintf("%04u",$annee) . '-' . sprintf("%02u",$mois) . '-'
    31                 . sprintf("%02u",$jour) . ' ' . sprintf("%02u",$h) . ':'
    32                 . sprintf("%02u",$m) . ':' . sprintf("%02u",$s);
     24        include_spip('base/abstract_sql');
     25        return sql_format_date($annee, $mois, $jour, $h, $m, $s);
    3326}
    3427
  • _core_/plugins/grenier/paquet.xml

    r50132 r60058  
    22        prefix="grenier"
    33        categorie="outil"
    4         version="0.2.0"
     4        version="0.2.1"
    55        etat="test"
    66        compatibilite="[3.0.0-alpha2;["
Note: See TracChangeset for help on using the changeset viewer.