{"id":48027,"date":"2025-11-17T10:57:15","date_gmt":"2025-11-17T10:57:15","guid":{"rendered":"https:\/\/www.carmatec.com\/?p=48027"},"modified":"2025-12-31T05:57:43","modified_gmt":"2025-12-31T05:57:43","slug":"maitriser-le-format-de-date-php-date-et-heure-comme-un-pro","status":"publish","type":"post","link":"https:\/\/www.carmatec.com\/fr_fr\/blog\/mastering-php-date-format-date-and-time-like-a-pro\/","title":{"rendered":"Ma\u00eetriser PHP Date() : Formater la date et l'heure comme un pro"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"48027\" class=\"elementor elementor-48027\" data-elementor-post-type=\"post\">\n\t\t\t\t<div class=\"elementor-element elementor-element-41de9ee e-flex e-con-boxed e-con e-parent\" data-id=\"41de9ee\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-30888a6 elementor-widget elementor-widget-text-editor\" data-id=\"30888a6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">PHP's <\/span><span style=\"font-weight: 400;\"><code>date()<\/code><\/span><span style=\"font-weight: 400;\"> est l'un des outils les plus puissants et les plus couramment utilis\u00e9s pour g\u00e9rer le formatage de la date et de l'heure dans les applications web. Qu'il s'agisse d'un blog, d'une plateforme de commerce \u00e9lectronique ou d'un tableau de bord, il est essentiel d'afficher les dates de mani\u00e8re conviviale. Dans ce guide complet,<br \/>nous allons nous plonger dans la <\/span><span style=\"font-weight: 400;\"><code>date()<\/code><\/span><span style=\"font-weight: 400;\"> explorer sa syntaxe, ses sp\u00e9cificateurs de format, des exemples concrets, les meilleures pratiques et les pi\u00e8ges les plus courants.<\/span><\/p><h3><strong>Qu'est-ce que la fonction PHP Date() ?<\/strong><\/h3><p><span style=\"font-weight: 400;\">Le <\/span><span style=\"font-weight: 400;\"><code>date()<\/code><\/span><span style=\"font-weight: 400;\"> en PHP formate une date et une heure locales selon une cha\u00eene de formatage sp\u00e9cifi\u00e9e. Elle renvoie une cha\u00eene repr\u00e9sentant la date et l'heure format\u00e9es.<\/span><\/p><h5><strong>Syntaxe de base<\/strong><\/h5><p><span style=\"font-weight: 400;\"><code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>string date(string $format, ?int $timestamp = null)<\/code><\/span><\/p><ul><li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><code>$format<\/code><\/span><span style=\"font-weight: 400;\">: Une cha\u00eene contenant des sp\u00e9cificateurs de format (par ex, <\/span><span style=\"font-weight: 400;\"><code>Y<\/code><\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\"><code>m<\/code><\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\"><code>d<\/code><\/span><span style=\"font-weight: 400;\">).<\/span><\/li><li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><code>$emps<\/code><\/span><span style=\"font-weight: 400;\">: Horodatage Unix facultatif. S'il est omis, l'heure actuelle est utilis\u00e9e.<\/span><\/li><\/ul><p><b><i>Note<\/i><\/b><i><span style=\"font-weight: 400;\">: A partir de PHP 8.0+, le second param\u00e8tre est nullable (<\/span><\/i><i><span style=\"font-weight: 400;\"><code>?int<\/code><\/span><\/i><i><span style=\"font-weight: 400;\">).<\/span><\/i><\/p><h3><strong>Principales sp\u00e9cifications du format de date PHP<\/strong><\/h3><p><span style=\"font-weight: 400;\">Voici un tableau de r\u00e9f\u00e9rence rapide des caract\u00e8res de format les plus couramment utilis\u00e9s :<\/span><\/p><table style=\"height: 1318px;\" width=\"288\"><tbody><tr><td><b>Sp\u00e9cification<\/b><\/td><td><b>Description<\/b><\/td><td><b>Exemple de sortie<\/b><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>Y<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Ann\u00e9e \u00e0 4 chiffres<\/span><\/td><td><span style=\"font-weight: 400;\">2026<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>y<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Ann\u00e9e \u00e0 2 chiffres<\/span><\/td><td><span style=\"font-weight: 400;\">25<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>m<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Mois (01-12)<\/span><\/td><td><span style=\"font-weight: 400;\">11<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>n<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Mois sans les z\u00e9ros initiaux (1-12)<\/span><\/td><td><span style=\"font-weight: 400;\">11<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>F<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Nom du mois complet<\/span><\/td><td><span style=\"font-weight: 400;\">Novembre<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>M<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Nom de mois court (3 lettres)<\/span><\/td><td><span style=\"font-weight: 400;\">Nov<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>d<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Jour du mois avec des z\u00e9ros en t\u00eate<\/span><\/td><td><span style=\"font-weight: 400;\">17<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>j<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Jour sans z\u00e9ros initiaux<\/span><\/td><td><span style=\"font-weight: 400;\">17<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>l<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Nom complet du jour de la semaine<\/span><\/td><td><span style=\"font-weight: 400;\">Lundi<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>D<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Jour de semaine court (3 lettres)<\/span><\/td><td><span style=\"font-weight: 400;\">Mon<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>H<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Format 24 heures (00-23)<\/span><\/td><td><span style=\"font-weight: 400;\">11<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>h<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Format 12 heures (01-12)<\/span><\/td><td><span style=\"font-weight: 400;\">11<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>i<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Minutes avec z\u00e9ros en t\u00eate<\/span><\/td><td><span style=\"font-weight: 400;\">37<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>s<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Secondes avec z\u00e9ros en t\u00eate<\/span><\/td><td><span style=\"font-weight: 400;\">45<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>UN<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Majuscule AM\/PM<\/span><\/td><td><span style=\"font-weight: 400;\">AM<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>a<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Minuscules am\/pm<\/span><\/td><td><span style=\"font-weight: 400;\">am<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>T<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Abr\u00e9viation du fuseau horaire<\/span><\/td><td><span style=\"font-weight: 400;\">TSI<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>c<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Format ISO 8601<\/span><\/td><td><span style=\"font-weight: 400;\">2026-11-17T11:37:45+05:30<\/span><\/td><\/tr><tr><td><span style=\"font-weight: 400;\"><code>r<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Format RFC 2822<br \/><\/span><\/td><td><span style=\"font-weight: 400;\">Mon, 17 Nov 2026 11:37:45<br \/>+0530<br \/><\/span><\/td><\/tr><\/tbody><\/table><h3><strong>Exemples de base de format de date en PHP<\/strong><\/h3><h5><strong>1. Date et heure actuelles<\/strong><\/h5><p><span style=\"font-weight: 400;\"><code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>echo date<\/code>(\u2018Y-m-d H:i:s\u2019) ;\u00a0<\/span><\/p><pre><span style=\"font-weight: 400;\"><code>\/\/ Sortie : 2026-11-17 11:37:45<\/code><\/span><\/pre><h5><strong>2. Format lisible par l'homme<\/strong><\/h5><p><span style=\"font-weight: 400;\"><code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>echo date<\/code>(\u2018l, F j, Y \\a\\t g:i A\u2019) ;\u00a0<\/span><\/p><pre><span style=\"font-weight: 400;\"><code>\/\/ Sortie : Lundi 17 novembre 2026 \u00e0 11h37<\/code><\/span><\/pre><p><i><span style=\"font-weight: 400;\">Utilisation <\/span><\/i><i><span style=\"font-weight: 400;\"><code>\\<\/code><\/span><\/i><i><span style=\"font-weight: 400;\"> pour \u00e9chapper \u00e0 des caract\u00e8res tels que <\/span><\/i><i><span style=\"font-weight: 400;\"><code>\u00e0<\/code><\/span><\/i><i><span style=\"font-weight: 400;\"> de sorte qu'ils apparaissent litt\u00e9ralement.<\/span><\/i><\/p><h5><strong>3. Date courte<\/strong><\/h5><p><span style=\"font-weight: 400;\"><code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>echo date('d\/m\/Y') ;\u00a0<\/code><\/span><\/p><pre><span style=\"font-weight: 400;\"><code>\/\/ Sortie : 17\/11\/2026<\/code><\/span><\/pre><h5><strong>4. Temps seulement<\/strong><\/h5><p><span style=\"font-weight: 400;\"><code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>echo date('h:i A') ;<\/code>\u00a0<\/span><\/p><pre><span style=\"font-weight: 400;\"><code>\/\/ Sortie : 11:37 AM<\/code><\/span><\/pre><h3><strong>Travailler avec des horodatages<\/strong><\/h3><p><span style=\"font-weight: 400;\">Vous pouvez formater n'importe quel horodatage Unix :<\/span><\/p><p><span style=\"font-weight: 400;\"><code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>$timestamp = strtotime('2026-01-01 00:00:00') ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>echo date('Y-m-d', $timestamp) ;<\/code><\/span><\/p><pre><span style=\"font-weight: 400;\"><code>\/\/ Sortie : 2026-01-01<\/code><\/span><\/pre><h5><strong>Combiner avec <\/strong><code>strtotime()<br \/><\/code><\/h5><p><span style=\"font-weight: 400;\"><code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>echo date('F j, Y', strtotime('+7 jours')) ;<\/code><\/span><\/p><pre><span style=\"font-weight: 400;\"><code>\/\/ Sortie : 24 novembre 2026<\/code><\/span><\/pre><h3><strong>Gestion des fuseaux horaires (critique !)<\/strong><\/h3><p><span style=\"font-weight: 400;\">Par d\u00e9faut, <\/span><span style=\"font-weight: 400;\"><code>date()<\/code><\/span><span style=\"font-weight: 400;\"> utilise le fuseau horaire par d\u00e9faut du serveur. Il faut toujours le d\u00e9finir explicitement :<\/span><\/p><p><span style=\"font-weight: 400;\"><code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>date_default_timezone_set('Asia\/Kolkata') ; \/\/ IST<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>echo date('Y-m-d H:i:s T') ;<\/code><\/span><\/p><pre><span style=\"font-weight: 400;\"><code>\/\/ Sortie : 2026-11-17 11:37:45 IST<\/code><\/span><\/pre><p><b><i>Meilleures pratiques<\/i><\/b><i><span style=\"font-weight: 400;\">: D\u00e9finissez le fuseau horaire en haut de votre fichier de configuration ou de votre point d'entr\u00e9e.<\/span><\/i><\/p><h3><strong>Cas concrets d'utilisation du format de date en PHP<\/strong><\/h3><h5>1. dates des articles de blog<\/h5><p><span style=\"font-weight: 400;\"><code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>$post_date = '2026-11-10 14:30:00' ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>echo date('M j, Y', strtotime($post_date)) ;<\/code><\/span><\/p><pre><span style=\"font-weight: 400;\"><code>\/\/ Sortie : 10 novembre 2026<\/code><\/span><\/pre><h5><strong>2. Temps relatif (\u201cil y a 2 heures\u201d)<\/strong><\/h5><p><span style=\"font-weight: 400;\"><code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>function timeAgo($timestamp) {<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0<code>\u00a0\u00a0$diff = time() - $timestamp ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0<code>\u00a0\u00a0if ($diff &lt; 60) return &quot;$diff il y a quelques secondes&quot; ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0<code>\u00a0\u00a0if ($diff &lt; 3600) return round($diff\/60) . &quot;il y a quelques minutes&quot; ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0<code>\u00a0\u00a0\u00a0if ($diff &lt; 86400) return round($diff\/3600) . &quot;Il y a quelques heures&quot; ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0<code>\u00a0\u00a0return date('M j', $timestamp) ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>}<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>echo timeAgo(strtotime('2026-11-17 09:00:00')) ;<\/code><\/span><\/p><pre><span style=\"font-weight: 400;\"><code>\/\/ Sortie : 2 hours ago<\/code><\/span><\/pre><h5><strong>3. Compte \u00e0 rebours de l'\u00e9v\u00e9nement<\/strong><\/h5><p><span style=\"font-weight: 400;\"><code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>$event = strtotime('2026-12-25 00:00:00') ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>$now = time() ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>$days_left = floor(($event - $now) \/ 86400) ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>echo \"No\u00ebl est dans $days_left jours !\";<\/code><\/span><\/p><pre><span style=\"font-weight: 400;\"><code>\/\/ Sortie : No\u00ebl est dans 38 jours !<\/code><\/span><\/pre><h3><strong>Les pi\u00e8ges les plus courants et comment les \u00e9viter<\/strong><\/h3><table style=\"height: 356px;\" width=\"298\"><tbody><tr><td><b>Enjeu<\/b><\/td><td><b>Solution<\/b><\/td><\/tr><tr><td><b>Fuseau horaire incorrect<\/b><\/td><td><span style=\"font-weight: 400;\">Toujours utiliser <\/span><span style=\"font-weight: 400;\"><code>date_default_timezone_set()<\/code><\/span><\/td><\/tr><tr><td><b>Des bogues semblables \u00e0 ceux du passage \u00e0 l'an 2000 avec <\/b><span style=\"font-weight: 400;\"><code>y<\/code><\/span><\/td><td><span style=\"font-weight: 400;\">Pr\u00e9f\u00e9rer <\/span><span style=\"font-weight: 400;\"><code>Y<\/code><\/span><span style=\"font-weight: 400;\"> pour l'ensemble de l'ann\u00e9e<\/span><\/td><\/tr><tr><td><b>Confusion des z\u00e9ros non significatifs<\/b><\/td><td><span style=\"font-weight: 400;\">Utilisation <\/span><span style=\"font-weight: 400;\"><code>j<\/code><\/span><span style=\"font-weight: 400;\"> au lieu de <\/span><span style=\"font-weight: 400;\">d<\/span><span style=\"font-weight: 400;\"> si vous ne voulez pas de z\u00e9ros<\/span><\/td><\/tr><tr><td><b>Probl\u00e8mes li\u00e9s \u00e0 la langue<\/b><\/td><td><span style=\"font-weight: 400;\">Utilisation <\/span><span style=\"font-weight: 400;\"><code>setlocale()<\/code><\/span><span style=\"font-weight: 400;\"> + <\/span><span style=\"font-weight: 400;\"><code>strftime()<\/code><\/span><span style=\"font-weight: 400;\"> pour les noms localis\u00e9s<\/span><\/td><\/tr><tr><td><b>D\u00e9class\u00e9 \u00e0 l'avenir ?<\/b><\/td><td><span style=\"font-weight: 400;\">Non, mais consid\u00e9rez <\/span><span style=\"font-weight: 400;\"><code>DateTime<\/code><\/span><span style=\"font-weight: 400;\"> pour les op\u00e9rations complexes<br \/><\/span><\/td><\/tr><\/tbody><\/table><h3><strong>Conseils de pro<\/strong><\/h3><p>1<b>. Utiliser <\/b><span style=\"font-weight: 400;\"><code>DateTime<\/code><\/span><b> pour les besoins avanc\u00e9s<\/b><\/p><p><span style=\"font-weight: 400;\"><code>2. php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>$dt = new DateTime('now', new DateTimeZone('Asia\/Kolkata')) ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code><\/code><\/span><span style=\"font-weight: 400;\"><code>3. echo $dt-&gt;format('Y-m-d H:i:s') ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code><\/code><\/span><span style=\"font-weight: 400;\"><code><\/code><\/span><span style=\"font-weight: 400;\"><code><\/code><\/span>4<b>. Cache des dates format\u00e9es<\/b><b><br \/><\/b><span style=\"font-weight: 400;\">\u00c9viter d'appeler <\/span><span style=\"font-weight: 400;\"><code>date()<\/code><\/span><span style=\"font-weight: 400;\"> dans les boucles pour la performance.<\/span><\/p><p><b>5. Valider les horodatages d'entr\u00e9e<\/b><\/p><p><span style=\"font-weight: 400;\">6. <code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>if ($timestamp === false) {<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0<code>\u00a0$timestamp = time() ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">7. <code>}<\/code><\/span><\/p><p>8<b>. L'internationalisation<\/b><\/p><p><span style=\"font-weight: 400;\">9. <code>php<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>setlocale(LC_TIME, 'hi_IN') ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\">10. <code>echo strftime('%e %B %Y') ; \/\/ Date hindi<\/code><\/span><\/p><h3><strong>Bonus : Formules de rendez-vous en une phrase<\/strong><\/h3><p><span style=\"font-weight: 400;\"><code>php<br \/><\/code><\/span><span style=\"font-weight: 400;\"><code><\/code><\/span><span style=\"font-weight: 400;\"><code>\/\/ ISO<br \/><\/code><\/span><span style=\"font-weight: 400;\"><code>date('c') ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>\/\/ Format US<\/code><br \/><\/span><span style=\"font-weight: 400;\"><code>date('m\/d\/Y h:i A') ;<\/code><\/span><\/p><p><span style=\"font-weight: 400;\"><code>\/\/ Format UE<\/code><br \/><\/span><span style=\"font-weight: 400;\"><code>date('d.m.Y H:i') ;<\/code><\/span><\/p><h2><strong>Conclusion<\/strong><\/h2><p><span style=\"font-weight: 400;\">Mastering <\/span><span style=\"font-weight: 400;\"><code>date()<\/code><\/span><span style=\"font-weight: 400;\"> Il s'agit de comprendre son <\/span><b>sp\u00e9cificateurs de format<\/b><span style=\"font-weight: 400;\">, <\/span><b>gestion des fuseaux horaires<\/b><span style=\"font-weight: 400;\">, et <\/span><b>l'int\u00e9gration avec <\/b><span style=\"font-weight: 400;\"><code>strtotime()<\/code><\/span><span style=\"font-weight: 400;\">. Tout en <\/span><span style=\"font-weight: 400;\"><code>DateTime<\/code><\/span><span style=\"font-weight: 400;\"> offre plus de puissance pour les sc\u00e9narios complexes, <\/span><span style=\"font-weight: 400;\">date()<\/span><span style=\"font-weight: 400;\"> reste l\u00e9ger, rapide et parfait pour 90% de nombreux cas d'utilisation. <\/span><a href=\"https:\/\/www.carmatec.com\/fr_fr\/\"><span style=\"font-weight: 400;\">Carmatec<\/span><\/a><span style=\"font-weight: 400;\">, un leader <\/span><a href=\"https:\/\/www.carmatec.com\/fr_fr\/societe-de-developpement-php\/\"><span style=\"font-weight: 400;\">Soci\u00e9t\u00e9 de d\u00e9veloppement PHP<\/span><\/a><span style=\"font-weight: 400;\">, Le syst\u00e8me de gestion de l'information de la Commission europ\u00e9enne, qui s'appuie sur le syst\u00e8me de gestion de l'information de la Commission europ\u00e9enne, permet d'offrir une fonctionnalit\u00e9 propre, efficace et fiable.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>PHP&#8217;s date() function is one of the most powerful and commonly used tools for handling date and time formatting in web applications. Whether you&#8217;re building a blog, e-commerce platform, or dashboard, displaying dates in a user-friendly way is essential. In this comprehensive guide,we&#8217;ll dive deep into the date() function, explore its syntax, format specifiers, real-world [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":48090,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-48027","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/www.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/posts\/48027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/comments?post=48027"}],"version-history":[{"count":0,"href":"https:\/\/www.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/posts\/48027\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/media\/48090"}],"wp:attachment":[{"href":"https:\/\/www.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/media?parent=48027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/categories?post=48027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.carmatec.com\/fr_fr\/wp-json\/wp\/v2\/tags?post=48027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}