Meta tags:
description= Complete technical reference for ISO 8601:2019 date and time representation standard. Formats, examples, and implementation guidelines.;
Headings (most frequently used words):
format, duration, date, time, week, builder, live, and, iso, utc, ordinal, intervals, adoption, reference, example, offset, examples, start, end, 8601, summary, calendar, of, day, zones, history, programming, complete, representation, truncated, representations, local, decimal, fractions, designator, rules, conversion, table, 2024, only, recurring, edition, timeline, related, standards, javascript, python, java, go, rust, ruby, php, swift, kotlin, dart, elixir, perl, scala, haskell, reduced, precision, basic, quick, official, sources,
Text of the page (most frequently used words):
2024 (125), iso (82), date (78), time (77), #format (75), 02t14 (62), the (55), and (55), 8601 (48), duration (43), now (41), only (38), utc (36), datetime (36), 00z (33), week (33), for (32), with (30), year (29), parse (26), tostring (23), yyyy (22), timezone (20), hours (20), dates (20), day (19), basic (19), string (18), extended (18), offset (16), number (15), when (15), end (14), full (14), iso8601 (13), seconds (13), start (13), minutes (12), calendar (12), from (11), ordinal (11), standard (10), instant (10), strftime (10), buf (10), section (10), not (10), days (10), representation (9), new (9), use (9), are (9), you (9), pt2h (8), local (8), two (8), months (8), month (8), live (8), weeks (8), digit (8), this (7), custom (7), localtime (7), today (7), example (7), that (7), same (7), which (6), w49 (6), period (6), common (6), 2019 (6), edition (6), can (6), interval (6), designator (6), separator (6), julian (6), international (5), rfc (5), 3339 (5), output (5), timestamps (5), more (5), defaulttimelocale (5), localdatetime (5), localdate (5), to_iso8601 (5), 000z (5), sizeof (5), unit (5), fractional (5), examples (5), december (5), apis (5), 1988 (5), first (5), intervals (5), components (5), between (5), years (5), used (5), pnynmndtnhnmns (5), january (5), 366 (5), compact (5), unambiguous (5), ssz (5), hhmmss (5), precision (5), order (5), like (4), timex (4), while (4), formattime (4), 0100 (4), sys (4), rfc3339 (4), isoformat (4), toisostring (4), values (4), how (4), has (4), rules (4), second (4), 2000 (4), your (4), hour (4), count (4), omit (4), one (4), four (4), all (4), units (4), builder (4), means (4), different (4), 337 (4), current (4), numbering (4), uses (4), ddd (4), www (4), information (4), decimal (4), p3y6m4dt12h30m5s (4), readable (3), reference (3), support (3), have (3), most (3), languages (3), profile (3), ofhours (3), datetimeformatter (3), zoneddatetime (3), strptime (3), naivedatetime (3), utc_now (3), dateformat (3), chrono (3), value (3), fmt (3), formatoptions (3), pt2h30m (3), universal (3), sortable (3), without (3), split (3), operations (3), durations (3), w3c (3), nato (3), extensions (3), p1m (3), repeat (3), every (3), required (3), know (3), represent (3), useful (3), copy (3), clipboard (3), interactive (3), before (3), but (3), may (3), daylight (3), saving (3), include (3), need (3), called (3), astronomy (3), 001 (3), leap (3), planning (3), military (3), using (3), differ (3), monday (3), contains (3), always (3), 2020 (3), suffix (3), offsets (3), zulu (3), databases (3), complete (3), needed (3), also (3), times (3), representations (3), formats (3), data (3), separators (3), document (2), com (2), machine (2), official (2), technical (2), varies (2), language (2), java (2), ruby (2), python (2), rust (2), elixir (2), isodate (2), produce (2), internet (2), true (2), str (2), package (2), europe (2), paris (2), gmtime (2), lubridate (2), to_string (2), microseconds (2), 000000 (2), 000 (2), toiso8601string (2), std (2), iso_week_date (2), iso8601dateformatter (2), measurement (2), dateinterval (2), atom (2), xmlschema (2), options (2), 2006 (2), timespan (2), utcnow (2), timedelta (2), show (2), including (2), programming (2), endorsement (2), xkcd (2), avoiding (2), ambiguity (2), adoption (2), note (2), 2004 (2), 1991 (2), published (2), timeline (2), history (2), just (2), working (2), whether (2), inclusive (2), exclusive (2), matters (2), monthly (2), starting (2), optional (2), recurring (2), context (2), point (2), dec (2), long (2), lasts (2), starts (2), both (2), expressing (2), periods (2), express (2), alone (2), each (2), things (2), after (2), confusion (2), zero (2), than (2), specific (2), letter (2), often (2), astronomical (2), 186 (2), aviation (2), within (2), makes (2), where (2), thursday (2), 2025 (2), w53 (2), w01 (2), sunday (2), system (2), regional (2), systems (2), ensures (2), exactly (2), practice (2), names (2), est (2), ambiguous (2), could (2), zones (2), phonetic (2), alphabet (2), indicates (2), log (2), pattern (2), style (2), comma (2), milliseconds (2), configure (2), see (2), reduced (2), midnight (2), smallest (2), fractions (2), largest (2), clock (2), write (2), thousand (2), alphabetical (2), chronological (2), february (2), 1969 (2), regardless (2), locale (2), storage (2), space (2), ddthh (2), yyyymmddthhmmssz (2), hhmm (2), hhmmssz (2), yyyywwwd (2), yyyyddd (2), yyyymmdd (2), part (2), sort (2), last, updated, 02t00, site, unofficial, educational, resource, trademark, organization, standardization, wikipedia, article, page, sources, combined, quick, comprehensive, documentation, native, net, built, others, consider, libraries, strict, designed, requires, allows, many, variations, parsetimem, iso8601show, utctime, haskell, iso_local_date_time, scala, piece, time_zone, module, perl, posixct, format_iso8601, from_iso8601, from_hours, utc_today, 000000z, toutc, dart, system_clock, kotlin, unitduration, sszzzzz, dateformatter, withtime, withfulldate, withinternetdatetime, withfractionalseconds, swift, object, gmdate, date_atom, php, activesupport, parse_from_rfc3339, crate, to_rfc3339_opts, secondsformat, secs, 3fz, to_rfc3339, 02t15, 000000000z, rfc3339nano, nanoseconds, xmlconvert, fromhours, 0000000, datetimeoffset, 0000000z, round, trip, p1y2m3d, offsetdatetime, duration_isoformat, fromisoformat, isocalendar, timespec, 1701528600000, unix, timestamp, replace, slice, tolocalestring, javascript, formatting, parsing, typical, popular, achieved, notable, cultural, recognition, webcomic, comic, 1179, humorously, advocates, sensible, ietf, united, nations, european, union, been, adopted, national, numerous, countries, mandated, recommended, library, congress, edtf, web, applications, uncertain, seasons, etc, related, standards, fourth, into, parts, third, further, revisions, revised, expanded, cor, corrigendum, development, global, implementation, represents, t09, t17, combining, doesn, specify, endpoints, convention, application, choice, clearly, r12, indefinitely, pt1h, occurrences, infinite, events, prefix, followed, given, recurrence, unbounded, repeats, forever, dependent, p1y2m, provides, ending, p6m, ends, span, ranges, booking, subscription, terms, supports, ways, forward, slash, points, p0d, reset, set, build, what, distinguishes, them, similarly, equal, during, transitions, pt24h, p1d, pt2m, p2m, p1m2w, invalid, p2w, cannot, mix, other, pt0, pt90s, p1y2m3dt4h, pt4h30m, p6m15d, p3y, any, decimals, rather, they, begin, separated, length, spans, although, colloquially, continuous, since, 4713, primarily, restart, jul, 032, feb, jan, converting, conversion, table, batch, lot, manufacturing, flight, maintenance, logs, star, catalogs, three, 365, easy, calculate, widely, contexts, counting, simplifies, near, actually, because, conversely, 2021, was, boundary, gotcha, thu, wed, mon, either, equivalently, 4th, some, conventions, through, literal, care, about, business, project, scheduling, payroll, belongs, occur, boundaries, store, transmit, then, convert, display, avoids, complications, comparison, straightforward, best, numeric, pst, intentional, cst, central, china, change, name, nzst, jst, ist, zone, represented, plus, east, minus, west, equivalent, concise, moments, depending, solves, appending, specifies, globally, api, responses, entries, coordinated, designators, explicitly, none, result, combine, form, colons, next, beginning, sub, add, fraction, prefers, accepted, permitted, positive, minute, eliminating, noon, written, similar, numbers, 1234, unambiguously, enables, simple, sorting, big, endian, why, century, isn, smaller, truncated, july, leading, zeros, march, 9th, tip, 0000, 9999, commonly, follows, unlike, mean, 2nd, 12th, possible, interpretation, gregorian, anywhere, humans, read, make, much, easier, visually, bandwidth, such, filenames, files, serialization, fewer, characters, type, defines, styles, human, valid, user, interfaces, saves, transmission, overview, summary, applied, loading, extension, includes, precise, works, across, regions, equals, building, storing, exchanging, everyone, interprets, way, representing, code,
Text of the page (random words):
t as next day s 00 00 00 reduced precision omit seconds or minutes when not needed hours and minutes 14 30 hours only 14 basic format compact form without colons complete 14 30 00 reduced 14 30 date time combine date and time with t separator 2024 12 02 t 14 30 00 interactive time builder configure your time format options and see the live result precision hours minutes seconds milliseconds timezone local none utc z offset hh mm decimal separator period comma format style extended hh mm ss basic hhmmss live output copy format to clipboard format pattern hh mm ssz the z suffix from zulu in nato phonetic alphabet explicitly indicates utc section 04 time zones utc coordinated universal time and timezone offset designators a time without timezone information is ambiguous 3 pm means different moments depending on where you are iso 8601 solves this by appending a timezone designator that specifies the offset from utc for timestamps that need to be unambiguous globally like api responses or log entries always include the timezone utc designator z zulu time zero utc offset the suffix z from zulu in the nato phonetic alphabet indicates utc it s equivalent to 00 00 but more concise use z for utc timestamps in apis and databases offset format format hh mm plus for east of utc minus for west hh hours offset 00 14 mm minutes offset 00 59 in practice only 00 30 and 45 are used by current time zones live offset examples the same instant in time represented with different timezone offsets zone offset 14 30 00 utc utc z 14 30 00z utc 0 00 00 14 30 00 00 00 est utc 5 05 00 05 00 ist utc 5 30 05 30 05 30 jst utc 9 09 00 09 00 nzst utc 12 12 00 12 00 offset vs timezone name iso 8601 uses numeric offsets not timezone names like est or pst this is intentional offsets are unambiguous while names can be ambiguous cst could be central standard time or china standard time and change with daylight saving best practice store and transmit timestamps in utc with z suffix then convert to local time for display this avoids daylight saving complications and makes comparison straightforward section 05 week date representation using iso week numbering year and week number week dates are useful when you care more about which week than which month common in business planning project scheduling and payroll systems the iso week system ensures every week has exactly 7 days and belongs to exactly one year avoiding the split weeks that occur at month boundaries week date format format yyyy www d yyyy iso week numbering year may differ from calendar year w week designator literal letter w ww week number 01 53 d day of week 1 monday through 7 sunday iso week rules the iso week system has specific rules that differ from some regional conventions weeks start on monday not sunday week 01 contains the first thursday of the year equivalently week 01 contains january 4th years have either 52 or 53 weeks live example 2024 12 02 mon 2024 w 49 1 2024 01 01 wed 2024 w01 3 2020 12 31 thu 2020 w53 4 year boundary gotcha the iso week numbering year may differ from the calendar year near december january for example december 30 2024 monday is actually 2025 w01 1 because that week contains the first thursday of 2025 conversely january 1 2021 was 2020 w53 5 always use the iso week year not the calendar year when working with week dates section 06 ordinal date representation using year and day of year number ordinal dates express a date as the day number within a year 1 365 or 1 366 for leap years this format is compact and makes it easy to calculate the number of days between dates within the same year it s widely used in astronomy aviation and military contexts where day counting simplifies operations ordinal date format live example 2024 337 today is day 337 of 2024 yyyy four digit year ddd three digit day of year 001 366 common uses astronomy julian dates and star catalogs aviation flight planning and maintenance logs manufacturing batch and lot numbering military operations planning often called julian dates conversion table 2024 converting between calendar and ordinal dates for the current year date ordinal day jan 1 2024 001 1 feb 1 2024 032 32 jul 4 2024 186 186 today 2024 337 337 dec 31 2024 366 366 2024 is a leap year 366 days not the same as julian date although often called julian dates colloquially iso 8601 ordinal dates are different from astronomical julian dates the astronomical julian date is a continuous count of days since january 1 4713 bc used primarily in astronomy iso 8601 ordinal dates restart at 001 each year section 07 duration representation of spans of time durations represent a length of time rather than a specific point in time they re useful for expressing things like 3 hours 2 weeks or 1 year 6 months and 15 days all durations begin with the letter p for period and time components are separated from date components by t duration format format pnynmndtnhnmns p period designator required starts every duration ny number of years nm number of months before t nd number of days t time designator required before hours minutes seconds nh number of hours nm number of minutes after t ns number of seconds can include decimals examples only include the units you need omit any with zero value 3 years p3y 6 months 15 days p6m15d 4 hours 30 minutes pt4h30m 1 year 2 months 3 days 4 hours p1y2m3dt4h 90 seconds pt90s 0 5 seconds pt0 5s week duration weeks can only be used alone you cannot mix weeks with other units 2 weeks p2w invalid p1m2w common confusion note that m means different things before and after the t p2m is 2 months but pt2m is 2 minutes the t separator is what distinguishes them similarly p1d is 1 day while pt24h is 24 hours which may not equal 1 day during daylight saving transitions interactive duration builder set the values for each unit to build your iso 8601 duration string date time units weeks only date components years months days time components hours minutes seconds reset all live output 0 days copy format to clipboard iso 8601 duration p0d section 08 time intervals representation of time periods between two points intervals represent a span of time useful for expressing date ranges booking periods or subscription terms iso 8601 supports four ways to express an interval start end start duration duration end or duration alone all use a forward slash as the separator start and end when you know both the start and end dates format start end 2024 01 01 2024 12 31 full year 2024 start and duration when you know when it starts and how long it lasts format start duration 2024 12 02 p1m one month starting today duration and end when you know when it ends and how long it lasts format duration end p6m 2024 12 31 6 months ending dec 31 2024 duration only when context provides the start or end point format duration p1y2m 1 year and 2 months context dependent recurring intervals for events that repeat prefix the interval with r followed by an optional count if no count is given the recurrence is unbounded repeats forever format rn interval components r recurring designator required n repeat count optional omit for infinite examples r5 2024 12 02 p1m 5 monthly occurrences starting today r pt1h repeat every hour indefinitely r12 2024 01 01 p1m monthly for a full year inclusive vs exclusive iso 8601 doesn t specify whether interval endpoints are inclusive or exclusive convention varies by application document your choice clearly when it matters combining with time intervals can use full datetime values not just dates for example 2024 12 02 t09 00 00z 2024 12 02 t17 00 00z represents working hours section 09 history adoption development timeline and global implementation edition timeline 1988 first edition published as iso 8601 1988 1991 iso 8601 1988 cor 1 1991 technical corrigendum 2000 second edition iso 8601 2000 revised and expanded 2004 third edition iso 8601 2004 further revisions 2019 fourth edition split into two parts iso 8601 1 2019 basic rules and iso 8601 2 2019 extensions related standards rfc 3339 internet date time format profile of iso 8601 iso 8601 2 2019 extensions uncertain dates seasons etc w3c note datetime w3c profile for web applications edtf extended date time format library of congress adoption iso 8601 has been adopted as a national standard in numerous countries and is mandated or recommended by european union united nations nato ietf w3c most apis xkcd endorsement the iso 8601 format has achieved notable cultural recognition including endorsement by the webcomic xkcd in comic 1179 which humorously advocates for the standard as the only sensible date format for avoiding ambiguity section 10 programming reference how to format and parse iso 8601 dates in popular languages examples show common iso 8601 formatting operations including full datetime date only time only week dates durations and parsing output examples show typical values for december 2 2024 at 14 30 00 utc javascript full iso datetime utc new date toisostring 2024 12 02t14 30 00 000z date only new date toisostring split t 0 2024 12 02 local datetime new date tolocalestring sv se 2024 12 02 14 30 00 custom format date toisostring replace t slice 0 19 2024 12 02 14 30 00 parse iso string new date 2024 12 02t14 30 00z unix timestamp to iso new date 1701528600000 toisostring python full iso datetime utc datetime now utc isoformat 2024 12 02t14 30 00 00 00 date only date today isoformat 2024 12 02 time only datetime now time isoformat 14 30 00 000000 without microseconds datetime now isoformat timespec seconds 2024 12 02t14 30 00 week number date today isocalendar 2024 49 1 parse iso string datetime fromisoformat 2024 12 02t14 30 00 duration timedelta isodate duration_isoformat timedelta hours 2 pt2h java full iso datetime utc instant now tostring 2024 12 02t14 30 00 000z date only localdate now tostring 2024 12 02 time only localtime now tostring 14 30 00 with timezone offset offsetdatetime now tostring 2024 12 02t14 30 00 01 00 week date localdate now format datetimeformatter iso_week_date 2024 w49 1 duration duration ofhours 2 tostring pt2h period period of 1 2 3 tostring p1y2m3d parse iso string instant parse 2024 12 02t14 30 00z c round trip format full datetime utcnow tostring o 2024 12 02t14 30 00 0000000z sortable format datetime now tostring s 2024 12 02t14 30 00 date only datetime now tostring yyyy mm dd 2024 12 02 universal sortable datetime utcnow tostring u 2024 12 02 14 30 00z with offset datetimeoffset now tostring o 2024 12 02t14 30 00 0000000 01 00 duration timespan xmlconvert tostring timespan fromhours 2 pt2h parse iso string datetime parse 2024 12 02t14 30 00z go rfc3339 iso 8601 time now utc format time rfc3339 2024 12 02t14 30 00z with nanoseconds time now format time rfc3339nano 2024 12 02t14 30 00 000000000z date only time now format 2006 01 02 2024 12 02 time only time now format 15 04 05 14 30 00 custom iso format time now format 2006 01 02t15 04 05 07 00 2024 12 02t14 30 00 01 00 parse iso string time parse time rfc3339 2024 12 02t14 30 00z rust rfc3339 chrono utc now to_rfc3339 2024 12 02t14 30 00 00 00 date only utc now format y m d to_string 2024 12 02 custom format utc now format y m dt h m s 3fz 2024 12 02t14 30 00 000z with options utc now to_rfc3339_opts secondsformat secs true 2024 12 02t14 30 00z duration iso8601 crate iso8601 duration duration parse pt2h30m parse iso string datetime parse_from_rfc3339 2024 12 02t14 30 00z ruby full iso datetime time now utc iso8601 2024 12 02t14 30 00z with fractional seconds time now iso8601 3 2024 12 02t14 30 00 000 01 00 date only date today iso8601 2024 12 02 xmlschema format time now xmlschema 2024 12 02t14 30 00 01 00 custom format time now strftime y m dt h m s z 2024 12 02t14 30 00 01 00 duration activesupport 2 hours iso8601 pt2h parse iso string time iso8601 2024 12 02t14 30 00z php iso 8601 full date c 2024 12 02t14 30 00 01 00 atom format date date_atom 2024 12 02t14 30 00 01 00 date only date y m d 2024 12 02 utc with z gmdate y m d th i s z 2024 12 02t14 30 00z week number date o ww n 2024 w49 1 datetime object new datetime format datetime atom duration dateinterval new dateinterval pt2h30m format pt hh im pt2h30m parse iso string new datetime 2024 12 02t14 30 00z swift iso 8601 full iso8601dateformatter string from date 2024 12 02t14 30 00z with fractional seconds fmt formatoptions withinternetdatetime withfractionalseconds 2024 12 02t14 30 00 000z date only fmt formatoptions withfulldate 2024 12 02 time only fmt formatoptions withtime 14 30 00 custom dateformatter df dateformat yyyy mm dd t hh mm sszzzzz duration measurement measurement value 2 unit unitduration hours parse iso string iso8601dateformatter date from 2024 12 02t14 30 00z kotlin iso instant instant now tostring 2024 12 02t14 30 00z localdatetime localdatetime now tostring 2024 12 02t14 30 00 date only localdate now tostring 2024 12 02 with timezone zoneddatetime now tostring 2024 12 02t14 30 00 01 00 europe paris week date localdate now format datetimeformatter iso_week_date 2024 w49 1 duration duration ofhours 2 tostring pt2h parse iso string instant parse 2024 12 02t14 30 00z c c iso 8601 datetime strftime buf sizeof buf y m dt h m sz gmtime t 2024 12 02t14 30 00z date only strftime buf sizeof buf y m d localtime t 2024 12 02 time only strftime buf sizeof buf h m s localtime t 14 30 00 with timezone offset strftime buf sizeof buf y m dt h m s z localtime t 2024 12 02t14 30 00 0100 week number strftime buf sizeof buf g w v u localtime t 2024 w49 1 c 20 chrono std format ft tz std chrono system_clock now parse strptime strptime 2024 12 02t14 30 00 y m dt h m s tm dart iso 8601 full datetime now toutc toiso8601string 2024 12 02t14 30 00 000z local time datetime now toiso8601string 2024 12 02t14 30 00 000 date only dateformat yyyy mm dd format datetime now 2024 12 02 custom format dateformat yyyy mm dd t hh mm ss format dt 2024 12 02t14 30 00 duration duration hours 2 minutes 30 tostring 2 30 00 000000 parse iso string datetime parse 2024 12 02t14 30 00z elixir iso 8601 utc datetime utc_now datetime to_iso8601 2024 12 02t14 30 00z with microseconds datetime to_iso8601 dt extended 2024 12 02t14 30 00 000000z date only date utc_today date to_iso8601 2024 12 02 time only time utc_now time to_iso8601 14 30 00 naivedatetime naivedatetime utc_now naivedatetime to_iso8601 2024 12 02t14 30 00 duration timex timex duration to_string timex duration from_hours 2 pt2h parse iso string datetime from_iso8601 2024 12 02t14 30 00z r iso 8601 format format sys time y m dt h m sz tz utc 2024 12 02t14 30 00z date only format sys date y m d 2024 12 02 with timezone format sys time y m dt h m s z 2024 12 02t14 30 00 0100 week number format sys date g w v u 2024 w49 1 lubridate package lubridate format_iso8601 now 2024 12 02t14 30 00z parse iso string as posixct 2024 12 02t14 30 00z format y m dt h m sz perl iso 8601 format strftime y m dt h m sz gmtime 2024 12 02t14 30 00z date only strftime y m d localtime 2024 12 02 with timezone strft...
|