Developer
Date Format Reference — ISO 8601, Unix Timestamp & More
Comprehensive date format reference covering ISO 8601, Unix timestamps, common format patterns across programming languages, and locale-specific formats.
ISO 8601 Formats
ISO 8601 is the international standard for date and time representation. It eliminates ambiguity by always using year-month-day order.
| Format | Example | Description |
|---|---|---|
| YYYY-MM-DD | 2026-03-17 | Date only |
| YYYY-MM-DDThh:mm:ss | 2026-03-17T14:30:00 | Date and time (local) |
| YYYY-MM-DDThh:mm:ssZ | 2026-03-17T14:30:00Z | Date and time in UTC |
| YYYY-MM-DDThh:mm:ss+hh:mm | 2026-03-17T14:30:00+09:00 | Date and time with timezone offset |
| YYYY-Www | 2026-W12 | Week date (week 12 of 2026) |
| YYYY-Www-D | 2026-W12-1 | Week date with day (Monday) |
| YYYY-DDD | 2026-076 | Ordinal date (76th day of year) |
| PnYnMnDTnHnMnS | P1Y2M3DT4H5M6S | Duration (1 year, 2 months, 3 days, 4h 5m 6s) |
| R/start/duration | R3/2026-01-01/P1M | Repeating interval (3 times, monthly) |
Unix Timestamp
The Unix timestamp is the number of seconds since January 1, 1970 00:00:00 UTC (the "Unix epoch"). Widely used in programming and APIs.
| Value | Date | Notes |
|---|---|---|
| 0 | 1970-01-01 00:00:00 UTC | Unix epoch |
| 946684800 | 2000-01-01 00:00:00 UTC | Y2K |
| 1000000000 | 2001-09-09 01:46:40 UTC | One billion seconds |
| 1700000000 | 2023-11-14 22:13:20 UTC | 1.7 billion seconds |
| 1742169600 | 2025-03-17 00:00:00 UTC | Recent example |
| 2000000000 | 2033-05-18 03:33:20 UTC | Two billion seconds |
| 2147483647 | 2038-01-19 03:14:07 UTC | Max 32-bit signed integer (Y2038 problem) |
Common Format Tokens
Format tokens used in JavaScript (date-fns, Day.js, Moment.js), Python, Java, and other languages.
| Token | Meaning | Example | Languages |
|---|---|---|---|
| YYYY / yyyy | Four-digit year | 2026 | JS / Java, Python |
| YY / yy | Two-digit year | 26 | JS / Java, Python |
| MM | Month (01-12) | 03 | All |
| M | Month (1-12) | 3 | JS, Java |
| MMM | Month abbreviation | Mar | All |
| MMMM | Month full name | March | All |
| DD / dd | Day of month (01-31) | 17 | JS / Java, Python |
| D / d | Day of month (1-31) | 7 | JS / Java |
| ddd / EEE | Day abbreviation | Mon | JS / Java |
| dddd / EEEE | Day full name | Monday | JS / Java |
| HH | Hour 24h (00-23) | 14 | All |
| hh | Hour 12h (01-12) | 02 | All |
| mm | Minute (00-59) | 30 | All |
| ss | Second (00-59) | 45 | All |
| SSS | Milliseconds | 123 | JS, Java |
| a / A | AM/PM | PM | JS, Java |
| Z / z | Timezone offset | +09:00 / KST | All |
| X / x | Unix timestamp (sec / ms) | 1742169600 | JS |
Date Formats by Locale
| Region / Locale | Format | Example | Standard |
|---|---|---|---|
| USA (en-US) | MM/DD/YYYY | 03/17/2026 | Month first |
| UK (en-GB) | DD/MM/YYYY | 17/03/2026 | Day first |
| Germany (de-DE) | DD.MM.YYYY | 17.03.2026 | Day first, dot separator |
| Japan (ja-JP) | YYYY/MM/DD | 2026/03/17 | Year first |
| Korea (ko-KR) | YYYY. MM. DD. | 2026. 03. 17. | Year first, trailing dots |
| China (zh-CN) | YYYY-MM-DD | 2026-03-17 | Year first (ISO compatible) |
| France (fr-FR) | DD/MM/YYYY | 17/03/2026 | Day first |
| Spain (es-ES) | DD/MM/YYYY | 17/03/2026 | Day first |
| Brazil (pt-BR) | DD/MM/YYYY | 17/03/2026 | Day first |
| ISO 8601 | YYYY-MM-DD | 2026-03-17 | International standard |
Formatting in Popular Languages
| Language | Code Example | Output |
|---|---|---|
| JavaScript | new Date().toISOString() | 2026-03-17T14:30:00.000Z |
| JavaScript | new Date().toLocaleDateString('en-US') | 3/17/2026 |
| Python | datetime.now().strftime('%Y-%m-%d') | 2026-03-17 |
| Python | datetime.now().strftime('%B %d, %Y') | March 17, 2026 |
| Java | LocalDate.now().format(DateTimeFormatter.ISO_DATE) | 2026-03-17 |
| Java | LocalDate.now().format(DateTimeFormatter.ofPattern("MMM dd, yyyy")) | Mar 17, 2026 |
| Go | time.Now().Format("2006-01-02") | 2026-03-17 |
| Go | time.Now().Format(time.RFC3339) | 2026-03-17T14:30:00+09:00 |
| Ruby | Time.now.strftime('%Y-%m-%d') | 2026-03-17 |
| PHP | date('Y-m-d H:i:s') | 2026-03-17 14:30:00 |
| C# | DateTime.Now.ToString("yyyy-MM-dd") | 2026-03-17 |
| Rust | chrono::Local::now().format("%Y-%m-%d") | 2026-03-17 |