par
zigz4g » 23 mars 2006, 14:37
Salut.
Est-ce que strtotime() te conviendrais ??? Bien sur si tu veux obtenir une date au format timestamp unix.
<?php
// Vient de la documentation php.
echo strtotime("now"), "\n";
echo strtotime("10 September 2000"), "\n";
echo strtotime("+1 day"), "\n";
echo strtotime("+1 week"), "\n";
echo strtotime("+1 week 2 days 4 hours 2 seconds"), "\n";
echo strtotime("next Thursday"), "\n";
echo strtotime("last Monday"), "\n";
?>
Regarde la documentation de
www.php.net en fr ou en. Elle te donne pleins d'infos sur comment gerer les dates.
Salut.
Est-ce que strtotime() te conviendrais ??? Bien sur si tu veux obtenir une date au format timestamp unix.
[php]
<?php
// Vient de la documentation php.
echo strtotime("now"), "\n";
echo strtotime("10 September 2000"), "\n";
echo strtotime("+1 day"), "\n";
echo strtotime("+1 week"), "\n";
echo strtotime("+1 week 2 days 4 hours 2 seconds"), "\n";
echo strtotime("next Thursday"), "\n";
echo strtotime("last Monday"), "\n";
?>
[/php]
Regarde la documentation de www.php.net en fr ou en. Elle te donne pleins d'infos sur comment gerer les dates.