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.

FormatExampleDescription
YYYY-MM-DD2026-03-17Date only
YYYY-MM-DDThh:mm:ss2026-03-17T14:30:00Date and time (local)
YYYY-MM-DDThh:mm:ssZ2026-03-17T14:30:00ZDate and time in UTC
YYYY-MM-DDThh:mm:ss+hh:mm2026-03-17T14:30:00+09:00Date and time with timezone offset
YYYY-Www2026-W12Week date (week 12 of 2026)
YYYY-Www-D2026-W12-1Week date with day (Monday)
YYYY-DDD2026-076Ordinal date (76th day of year)
PnYnMnDTnHnMnSP1Y2M3DT4H5M6SDuration (1 year, 2 months, 3 days, 4h 5m 6s)
R/start/durationR3/2026-01-01/P1MRepeating 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.

ValueDateNotes
01970-01-01 00:00:00 UTCUnix epoch
9466848002000-01-01 00:00:00 UTCY2K
10000000002001-09-09 01:46:40 UTCOne billion seconds
17000000002023-11-14 22:13:20 UTC1.7 billion seconds
17421696002025-03-17 00:00:00 UTCRecent example
20000000002033-05-18 03:33:20 UTCTwo billion seconds
21474836472038-01-19 03:14:07 UTCMax 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.

TokenMeaningExampleLanguages
YYYY / yyyyFour-digit year2026JS / Java, Python
YY / yyTwo-digit year26JS / Java, Python
MMMonth (01-12)03All
MMonth (1-12)3JS, Java
MMMMonth abbreviationMarAll
MMMMMonth full nameMarchAll
DD / ddDay of month (01-31)17JS / Java, Python
D / dDay of month (1-31)7JS / Java
ddd / EEEDay abbreviationMonJS / Java
dddd / EEEEDay full nameMondayJS / Java
HHHour 24h (00-23)14All
hhHour 12h (01-12)02All
mmMinute (00-59)30All
ssSecond (00-59)45All
SSSMilliseconds123JS, Java
a / AAM/PMPMJS, Java
Z / zTimezone offset+09:00 / KSTAll
X / xUnix timestamp (sec / ms)1742169600JS

Date Formats by Locale

Region / LocaleFormatExampleStandard
USA (en-US)MM/DD/YYYY03/17/2026Month first
UK (en-GB)DD/MM/YYYY17/03/2026Day first
Germany (de-DE)DD.MM.YYYY17.03.2026Day first, dot separator
Japan (ja-JP)YYYY/MM/DD2026/03/17Year first
Korea (ko-KR)YYYY. MM. DD.2026. 03. 17.Year first, trailing dots
China (zh-CN)YYYY-MM-DD2026-03-17Year first (ISO compatible)
France (fr-FR)DD/MM/YYYY17/03/2026Day first
Spain (es-ES)DD/MM/YYYY17/03/2026Day first
Brazil (pt-BR)DD/MM/YYYY17/03/2026Day first
ISO 8601YYYY-MM-DD2026-03-17International standard

Formatting in Popular Languages

LanguageCode ExampleOutput
JavaScriptnew Date().toISOString()2026-03-17T14:30:00.000Z
JavaScriptnew Date().toLocaleDateString('en-US')3/17/2026
Pythondatetime.now().strftime('%Y-%m-%d')2026-03-17
Pythondatetime.now().strftime('%B %d, %Y')March 17, 2026
JavaLocalDate.now().format(DateTimeFormatter.ISO_DATE)2026-03-17
JavaLocalDate.now().format(DateTimeFormatter.ofPattern("MMM dd, yyyy"))Mar 17, 2026
Gotime.Now().Format("2006-01-02")2026-03-17
Gotime.Now().Format(time.RFC3339)2026-03-17T14:30:00+09:00
RubyTime.now.strftime('%Y-%m-%d')2026-03-17
PHPdate('Y-m-d H:i:s')2026-03-17 14:30:00
C#DateTime.Now.ToString("yyyy-MM-dd")2026-03-17
Rustchrono::Local::now().format("%Y-%m-%d")2026-03-17

Related Tools