🐘
PHP DD/MM/YYYY
Ieșire: 15/01/2025
Referință Rapidă
Șir de Format
d/m/Y
Ieșire
15/01/2025
Formatarea datei ca DD/MM/YYYY în PHP
🐘 PHP
<?php
$date = new DateTime();
echo $date->format('d/m/Y'); // Output: 31/12/2025
// Or using date() function
echo date('d/m/Y'); // Output: 31/12/2025Coduri de format dată PHP
| Cod | Semnificație | Exemplu |
|---|---|---|
| d | Day (01-31) | 31 |
| j | Day (1-31) | 31 |
| m | Month (01-12) | 12 |
| n | Month (1-12) | 12 |
| Y | Year (4 digits) | 2025 |
| y | Year (2 digits) | 25 |
| M | Abbreviated month | Dec |
| F | Full month | December |
Alte formate în PHP
DD/MM/YYYY în alte limbaje
Documentație Oficială
Pentru mai multe informații despre formatarea datelor în PHP, vezi documentația oficială: