Classe plxShow
Fichier core/lib/class.plx.show.php
Fonction artDate
Méthode qui affiche la date de publication de l'article selon le format choisi
Déclaration
public function artDate($format='#day #num_day #month #num_year(4)
Portée de la fonction : home,categorie,article,tags,archives
Paramètres
- format : format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_day(1), #num_day(2), #num_month, #num_year(4), #num_year(2), #time)
Usage(Edit)
<?php $plxShow->artDate('$format') ?>
Détails des paramètres(Edit)
- $format (string) (optionnel) : format de la date ; valeurs par défaut : '#day #num_day #month #num_year(4)' ; valeurs possibles :
- #minute : affiche les minutes
- #hour : affiche l'heure de publication
- #day : affiche le jour (au format texte : lundi, mardi, etc...)
- #month : affiche le mois (au format texte : janvier, février, mars, etc...)
- #num_day : affiche le numéro du jour du mois (1, 15, ..., 31,)
- #num_month : affiche le numéro du mois (1, 2, 5, ..., 12)
- #num_year(4) : affiche l'année sur 4 chiffres (ex: 2012)
- #num_year(2) : affiche l'année sur 2 chiffres (ex: 12)
- valeur libre : chaîne de caractère de son choix
Exemples(Edit)
<?php $plxShow->artDate() ?>
<?php $plxShow->artDate('#num_day #month #num_year(4)') ?>
Exemples avancés(Edit)
Formatage avancé avec des caractères libres :
<?php $plxShow->artDate('#hour:#minute') ?>
<?php $plxShow->artDate('#num_day/#num_month/#num_year(4)') ?>
Accès rapide : Wiki Développeur - Wiki Général