Skip to content

$cal.year

Description

Retourne l'année actuelle.

Syntaxe

$cal.year( [ format ] )

Paramètres

format string
Format de string à retourner. La valeur attend une règle de formatage selon le format décrit dans Formatter#syntax

Retour

Année en cours

Exemple

1
2
$cal.year();        // année sur 4 chiffres
$cal.year() % 100;  // année sur 2 chiffres