diff --git a/404.html b/404.html index e384988..9d792ea 100644 --- a/404.html +++ b/404.html @@ -5,13 +5,13 @@ Page Not Found | iso-fns - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/2814a0e7.5b1aa2cd.js b/assets/js/2814a0e7.d97a8a02.js similarity index 97% rename from assets/js/2814a0e7.5b1aa2cd.js rename to assets/js/2814a0e7.d97a8a02.js index 8a66eb8..dd1ee23 100644 --- a/assets/js/2814a0e7.5b1aa2cd.js +++ b/assets/js/2814a0e7.d97a8a02.js @@ -1 +1 @@ -"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[925],{3905:function(e,t,a){a.d(t,{Zo:function(){return k},kt:function(){return s}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var m=n.createContext({}),p=function(e){var t=n.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},k=function(e){var t=p(e.components);return n.createElement(m.Provider,{value:t},e.children)},o={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,m=e.parentName,k=d(e,["components","mdxType","originalType","parentName"]),N=p(a),s=r,f=N["".concat(m,".").concat(s)]||N[s]||o[s]||i;return a?n.createElement(f,l(l({ref:t},k),{},{components:a})):n.createElement(f,l({ref:t},k))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=N;var d={};for(var m in t)hasOwnProperty.call(t,m)&&(d[m]=t[m]);d.originalType=e,d.mdxType="string"==typeof e?e:r,l[1]=d;for(var p=2;p")))),(0,i.kt)("h4",{id:"returns-26"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L65"},"types/IZonedDateTimeFns.ts:65")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"withtimezone"},"withTimeZone"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"withTimeZone"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"timeZone"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-26"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"timeZone")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string"))))),(0,i.kt)("h4",{id:"returns-27"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L66"},"types/IZonedDateTimeFns.ts:66")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"add"},"add"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"add"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"temporalDurationLike"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-27"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"temporalDurationLike")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))," ","|"," { ",(0,i.kt)("inlineCode",{parentName:"td"},"years?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"months?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"weeks?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"days?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"hours?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"minutes?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"seconds?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"milliseconds?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," }")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.overflow?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalOverflow"))))),(0,i.kt)("h4",{id:"returns-28"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L67"},"types/IZonedDateTimeFns.ts:67")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"subtract"},"subtract"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"subtract"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"temporalDurationLike"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-28"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"temporalDurationLike")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))," ","|"," { ",(0,i.kt)("inlineCode",{parentName:"td"},"years?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"months?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"weeks?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"days?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"hours?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"minutes?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"seconds?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"milliseconds?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," }")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.overflow?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalOverflow"))))),(0,i.kt)("h4",{id:"returns-29"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L83"},"types/IZonedDateTimeFns.ts:83")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"until"},"until"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"until"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"other"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))),(0,i.kt)("h4",{id:"parameters-29"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"other")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.largestUnit?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalSingularUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},"TemporalPluralUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"auto"'))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.smallestUnit?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalSingularUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},"TemporalPluralUnit"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingIncrement?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingMode?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalRoundingMode"))))),(0,i.kt)("h4",{id:"returns-30"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))),(0,i.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L99"},"types/IZonedDateTimeFns.ts:99")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"since"},"since"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"since"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"other"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))),(0,i.kt)("h4",{id:"parameters-30"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"other")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.largestUnit?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalSingularUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},"TemporalPluralUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"auto"'))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.smallestUnit?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalSingularUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},"TemporalPluralUnit"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingIncrement?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingMode?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalRoundingMode"))))),(0,i.kt)("h4",{id:"returns-31"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))),(0,i.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L109"},"types/IZonedDateTimeFns.ts:109")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"round"},"round"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"round"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-31"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.smallestUnit")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},'"day"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"hour"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"minute"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"second"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"millisecond"'))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingIncrement?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingMode?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalRoundingMode"))))),(0,i.kt)("h4",{id:"returns-32"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L119"},"types/IZonedDateTimeFns.ts:119")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"equals"},"equals"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"equals"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"other"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"parameters-32"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"other")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-33"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L127"},"types/IZonedDateTimeFns.ts:127")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"startofday"},"startOfDay"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"startOfDay"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-33"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-34"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L128"},"types/IZonedDateTimeFns.ts:128")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"toinstant"},"toInstant"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toInstant"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/Instant#instant"},(0,i.kt)("inlineCode",{parentName:"a"},"Instant"))),(0,i.kt)("h4",{id:"parameters-34"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-35"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/Instant#instant"},(0,i.kt)("inlineCode",{parentName:"a"},"Instant"))),(0,i.kt)("h4",{id:"defined-in-36"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L129"},"types/IZonedDateTimeFns.ts:129")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"todate"},"toDate"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toDate"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/Date#date"},(0,i.kt)("inlineCode",{parentName:"a"},"Date"))),(0,i.kt)("h4",{id:"parameters-35"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-36"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/Date#date"},(0,i.kt)("inlineCode",{parentName:"a"},"Date"))),(0,i.kt)("h4",{id:"defined-in-37"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L130"},"types/IZonedDateTimeFns.ts:130")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"totime"},"toTime"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toTime"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/Time#time"},(0,i.kt)("inlineCode",{parentName:"a"},"Time"))),(0,i.kt)("h4",{id:"parameters-36"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-37"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/Time#time"},(0,i.kt)("inlineCode",{parentName:"a"},"Time"))),(0,i.kt)("h4",{id:"defined-in-38"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L131"},"types/IZonedDateTimeFns.ts:131")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"todatetime"},"toDateTime"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toDateTime"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/DateTime#datetime"},(0,i.kt)("inlineCode",{parentName:"a"},"DateTime"))),(0,i.kt)("h4",{id:"parameters-37"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-38"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/DateTime#datetime"},(0,i.kt)("inlineCode",{parentName:"a"},"DateTime"))),(0,i.kt)("h4",{id:"defined-in-39"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L132"},"types/IZonedDateTimeFns.ts:132")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"toyearmonth"},"toYearMonth"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toYearMonth"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/YearMonth#yearmonth"},(0,i.kt)("inlineCode",{parentName:"a"},"YearMonth"))),(0,i.kt)("h4",{id:"parameters-38"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-39"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/YearMonth#yearmonth"},(0,i.kt)("inlineCode",{parentName:"a"},"YearMonth"))),(0,i.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L133"},"types/IZonedDateTimeFns.ts:133")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"tomonthday"},"toMonthDay"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toMonthDay"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/MonthDay#monthday"},(0,i.kt)("inlineCode",{parentName:"a"},"MonthDay"))),(0,i.kt)("h4",{id:"parameters-39"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-40"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/MonthDay#monthday"},(0,i.kt)("inlineCode",{parentName:"a"},"MonthDay"))),(0,i.kt)("h4",{id:"defined-in-41"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L134"},"types/IZonedDateTimeFns.ts:134")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"getfields"},"getFields"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"getFields"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"Object")),(0,i.kt)("h4",{id:"parameters-40"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-41"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Object")),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"day")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"hour")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"millisecond")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"minute")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"month")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"second")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"year")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"offset")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"timeZone")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string"))))),(0,i.kt)("h4",{id:"defined-in-42"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L135"},"types/IZonedDateTimeFns.ts:135")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"from"},"from"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"from"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"item"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-41"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"item")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"any"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.overflow?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalOverflow"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.disambiguation?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalDisambiguation"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.offset?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalOffset"))))),(0,i.kt)("h4",{id:"returns-42"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-43"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L146"},"types/IZonedDateTimeFns.ts:146")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"compare"},"compare"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"compare"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"one"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"two"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"number")),(0,i.kt)("h4",{id:"parameters-42"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"one")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"two")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-43"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"number")),(0,i.kt)("h4",{id:"defined-in-44"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L154"},"types/IZonedDateTimeFns.ts:154")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"format"},"format"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"format"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"format"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"summary"))," Format the ZonedDateTime."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"description")),"\nReturn the formatted ZonedDateTime string in the given format."),(0,i.kt)("p",null,"The characters wrapped between two single quotes characters (') are escaped.\nTwo single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n(see the last example)"),(0,i.kt)("p",null,"Format of the string is based on Unicode Technical Standard #35:\n",(0,i.kt)("a",{parentName:"p",href:"https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table"},"https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table"),"\nwith a few additions (see note 7 below the table)."),(0,i.kt)("p",null,"Accepted patterns:"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Unit"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Pattern"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Result examples"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Notes"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Era"),(0,i.kt)("td",{parentName:"tr",align:"left"},"G..GGG"),(0,i.kt)("td",{parentName:"tr",align:"left"},"AD, BC"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"GGGG"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Anno Domini, Before Christ"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"GGGGG"),(0,i.kt)("td",{parentName:"tr",align:"left"},"A, B"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Calendar year"),(0,i.kt)("td",{parentName:"tr",align:"left"},"y"),(0,i.kt)("td",{parentName:"tr",align:"left"},"44, 1, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"yo"),(0,i.kt)("td",{parentName:"tr",align:"left"},"44th, 1st, 0th, 17th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4,5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"yy"),(0,i.kt)("td",{parentName:"tr",align:"left"},"44, 01, 00, 17"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"yyy"),(0,i.kt)("td",{parentName:"tr",align:"left"},"044, 001, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"yyyy"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0044, 0001, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"yyyyy"),(0,i.kt)("td",{parentName:"tr",align:"left"},"..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"2,4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Extended year"),(0,i.kt)("td",{parentName:"tr",align:"left"},"u"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-43, 0, 1, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"uu"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-43, 01, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"uuu"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-043, 001, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"uuuu"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-0043, 0001, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"uuuuu"),(0,i.kt)("td",{parentName:"tr",align:"left"},"..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"2,4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Quarter"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Q"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, 3, 4"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"Qo"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, 3rd, 4th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"QQ"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, 03, 04"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"QQQ"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Q1, Q2, Q3, Q4"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"QQQQ"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st quarter, 2nd quarter, ..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"QQQQQ"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, 3, 4"),(0,i.kt)("td",{parentName:"tr",align:"left"},"3")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Month"),(0,i.kt)("td",{parentName:"tr",align:"left"},"M"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, ..., 12"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"Mo"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 12th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"MM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 12"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"MMM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Jan, Feb, ..., Dec"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"MMMM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"January, February, ..., December"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"MMMMM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"J, F, ..., D"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"ISO week of year"),(0,i.kt)("td",{parentName:"tr",align:"left"},"I"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, ..., 53"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"Io"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 53th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"II"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 53"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Day of month"),(0,i.kt)("td",{parentName:"tr",align:"left"},"d"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, ..., 31"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"do"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 31st"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"dd"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 31"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"ISO day of week"),(0,i.kt)("td",{parentName:"tr",align:"left"},"i"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, 3, ..., 7"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"io"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 7th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"ii"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 07"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"iii"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Mon, Tue, Wed, ..., Sun"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"iiii"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Monday, Tuesday, ..., Sunday"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1,5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"iiiii"),(0,i.kt)("td",{parentName:"tr",align:"left"},"M, T, W, T, F, S, S"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"iiiiii"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Mo, Tu, We, Th, Fr, Sa, Su"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"AM, PM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"a..aa"),(0,i.kt)("td",{parentName:"tr",align:"left"},"AM, PM"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"aaa"),(0,i.kt)("td",{parentName:"tr",align:"left"},"am, pm"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"aaaa"),(0,i.kt)("td",{parentName:"tr",align:"left"},"a.m., p.m."),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"aaaaa"),(0,i.kt)("td",{parentName:"tr",align:"left"},"a, p"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"AM, PM, noon, midnight"),(0,i.kt)("td",{parentName:"tr",align:"left"},"b..bb"),(0,i.kt)("td",{parentName:"tr",align:"left"},"AM, PM, noon, midnight"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"bbb"),(0,i.kt)("td",{parentName:"tr",align:"left"},"am, pm, noon, midnight"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"bbbb"),(0,i.kt)("td",{parentName:"tr",align:"left"},"a.m., p.m., noon, midnight"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"bbbbb"),(0,i.kt)("td",{parentName:"tr",align:"left"},"a, p, n, mi"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Flexible day period"),(0,i.kt)("td",{parentName:"tr",align:"left"},"B..BBB"),(0,i.kt)("td",{parentName:"tr",align:"left"},"at night, in the morning, ..."),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"BBBB"),(0,i.kt)("td",{parentName:"tr",align:"left"},"at night, in the morning, ..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"BBBBB"),(0,i.kt)("td",{parentName:"tr",align:"left"},"at night, in the morning, ..."),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Hour ","[1-12]"),(0,i.kt)("td",{parentName:"tr",align:"left"},"h"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, ..., 11, 12"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"ho"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 11th, 12th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"hh"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 11, 12"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Hour ","[0-23]"),(0,i.kt)("td",{parentName:"tr",align:"left"},"H"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0, 1, 2, ..., 23"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"Ho"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0th, 1st, 2nd, ..., 23rd"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"HH"),(0,i.kt)("td",{parentName:"tr",align:"left"},"00, 01, 02, ..., 23"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Hour ","[0-11]"),(0,i.kt)("td",{parentName:"tr",align:"left"},"K"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, ..., 11, 0"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"Ko"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 11th, 0th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"KK"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 11, 00"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Hour ","[1-24]"),(0,i.kt)("td",{parentName:"tr",align:"left"},"k"),(0,i.kt)("td",{parentName:"tr",align:"left"},"24, 1, 2, ..., 23"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"ko"),(0,i.kt)("td",{parentName:"tr",align:"left"},"24th, 1st, 2nd, ..., 23rd"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"kk"),(0,i.kt)("td",{parentName:"tr",align:"left"},"24, 01, 02, ..., 23"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Minute"),(0,i.kt)("td",{parentName:"tr",align:"left"},"m"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0, 1, ..., 59"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"mo"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0th, 1st, ..., 59th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"mm"),(0,i.kt)("td",{parentName:"tr",align:"left"},"00, 01, ..., 59"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Second"),(0,i.kt)("td",{parentName:"tr",align:"left"},"s"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0, 1, ..., 59"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"so"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0th, 1st, ..., 59th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"ss"),(0,i.kt)("td",{parentName:"tr",align:"left"},"00, 01, ..., 59"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Fraction of second"),(0,i.kt)("td",{parentName:"tr",align:"left"},"S"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0, 1, ..., 9"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"SS"),(0,i.kt)("td",{parentName:"tr",align:"left"},"00, 01, ..., 99"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"SSS"),(0,i.kt)("td",{parentName:"tr",align:"left"},"000, 001, ..., 999"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"SSSS"),(0,i.kt)("td",{parentName:"tr",align:"left"},"..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"2")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timezone (ISO-8601 w/ Z)"),(0,i.kt)("td",{parentName:"tr",align:"left"},"X"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08, +0530, Z"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"XX"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-0800, +0530, Z"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"XXX"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08:00, +05:30, Z"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"XXXX"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-0800, +0530, Z, +123456"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"XXXXX"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08:00, +05:30, Z, +12:34:56"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timezone (ISO-8601 w/o Z)"),(0,i.kt)("td",{parentName:"tr",align:"left"},"x"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08, +0530, +00"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"xx"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-0800, +0530, +0000"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"xxx"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08:00, +05:30, +00:00"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"xxxx"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-0800, +0530, +0000, +123456"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"xxxxx"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08:00, +05:30, +00:00, +12:34:56"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timezone (GMT)"),(0,i.kt)("td",{parentName:"tr",align:"left"},"O...OOO"),(0,i.kt)("td",{parentName:"tr",align:"left"},"GMT-8, GMT+5:30, GMT+0"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"OOOO"),(0,i.kt)("td",{parentName:"tr",align:"left"},"GMT-08:00, GMT+05:30, GMT+00:00"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timezone (specific non-locat.)"),(0,i.kt)("td",{parentName:"tr",align:"left"},"z...zzz"),(0,i.kt)("td",{parentName:"tr",align:"left"},"CST, CST, CST"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"zzzz"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Central Standard Time"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Long localized date"),(0,i.kt)("td",{parentName:"tr",align:"left"},"P"),(0,i.kt)("td",{parentName:"tr",align:"left"},"04/29/1453"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PP"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Apr 29, 1453"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PPP"),(0,i.kt)("td",{parentName:"tr",align:"left"},"April 29th, 1453"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PPPP"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Friday, April 29th, 1453"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1,5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Long localized time"),(0,i.kt)("td",{parentName:"tr",align:"left"},"p"),(0,i.kt)("td",{parentName:"tr",align:"left"},"12:00 AM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"pp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"12:00:00 AM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"ppp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"12:00:00 AM CDT"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"pppp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"12:00:00 AM Central Daylight Time"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1,5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Combination of date and time"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Pp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"04/29/1453, 12:00 AM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PPpp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Apr 29, 1453, 12:00:00 AM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PPPppp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"April 29th, 1453 at ..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PPPPpppp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Friday, April 29th, 1453 at ..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"1,5")))),(0,i.kt)("p",null,"Notes:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Any sequence of the identical letters is a pattern, unless it is escaped by\nthe single quote characters (see below).\nIf the sequence is longer than listed in table (e.g. ",(0,i.kt)("inlineCode",{parentName:"p"},"EEEEEEEEEEE"),")\nthe output will be the same as default pattern for this unit, usually\nthe longest one (in case of ISO weekdays, ",(0,i.kt)("inlineCode",{parentName:"p"},"EEEE"),'). Default patterns for units\nare marked with "2" in the last column of the table.'),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMM') //=> 'Nov'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Some patterns could be unlimited length (such as ",(0,i.kt)("inlineCode",{parentName:"p"},"yyyyyyyy"),").\nThe output will be padded with zeros to match the length of the pattern."),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'yyyyyyyy') //=> '00002017'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"QQQQQ")," could be not strictly numerical in some locales.\nThese tokens represent the shortest form of the quarter.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"The main difference between ",(0,i.kt)("inlineCode",{parentName:"p"},"y")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"u")," patterns are B.C. years:"),(0,i.kt)("table",{parentName:"li"},(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Year"),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"y")),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"u")))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"AC 1"),(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"BC 1"),(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"0")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"BC 2"),(0,i.kt)("td",{parentName:"tr",align:null},"2"),(0,i.kt)("td",{parentName:"tr",align:null},"-1")))),(0,i.kt)("p",{parentName:"li"},"Also ",(0,i.kt)("inlineCode",{parentName:"p"},"yy")," always returns the last two digits of a year,\nwhile ",(0,i.kt)("inlineCode",{parentName:"p"},"uu")," pads single digit years to 2 characters and returns other years unchanged:"),(0,i.kt)("table",{parentName:"li"},(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Year"),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"yy")),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"uu")))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"01"),(0,i.kt)("td",{parentName:"tr",align:null},"01")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"14"),(0,i.kt)("td",{parentName:"tr",align:null},"14"),(0,i.kt)("td",{parentName:"tr",align:null},"14")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"376"),(0,i.kt)("td",{parentName:"tr",align:null},"76"),(0,i.kt)("td",{parentName:"tr",align:null},"376")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1453"),(0,i.kt)("td",{parentName:"tr",align:null},"53"),(0,i.kt)("td",{parentName:"tr",align:null},"1453"))))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"i"),": ISO day of week"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"I"),": ISO week of year"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"P"),": long localized date"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"p"),": long localized time")))),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,i.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"example"))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"// Represent 11 February 2014 in middle-endian format:\nvar result = format(\"2014-02-11T00:00:00+00:00[UTC]\", 'MM/dd/yyyy')\n//=> '02/11/2014'\n")),(0,i.kt)("h4",{id:"parameters-43"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"format")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"the string of tokens")))),(0,i.kt)("h4",{id:"returns-44"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("p",null,"the formatted date string"),(0,i.kt)("h4",{id:"defined-in-45"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L335"},"types/IZonedDateTimeFns.ts:335")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"chain"},"chain"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"chain"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"IZonedDateTimeChain")),(0,i.kt)("h4",{id:"parameters-44"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-45"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"IZonedDateTimeChain")),(0,i.kt)("h4",{id:"defined-in-46"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IZonedDateTimeFns.ts#L336"},"types/IZonedDateTimeFns.ts:336")))}N.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[925],{3905:function(e,t,a){a.d(t,{Zo:function(){return k},kt:function(){return s}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var m=n.createContext({}),p=function(e){var t=n.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},k=function(e){var t=p(e.components);return n.createElement(m.Provider,{value:t},e.children)},o={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,m=e.parentName,k=d(e,["components","mdxType","originalType","parentName"]),N=p(a),s=r,f=N["".concat(m,".").concat(s)]||N[s]||o[s]||i;return a?n.createElement(f,l(l({ref:t},k),{},{components:a})):n.createElement(f,l({ref:t},k))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=N;var d={};for(var m in t)hasOwnProperty.call(t,m)&&(d[m]=t[m]);d.originalType=e,d.mdxType="string"==typeof e?e:r,l[1]=d;for(var p=2;p")))),(0,i.kt)("h4",{id:"returns-26"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-27"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L65"},"types/IZonedDateTimeFns.ts:65")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"withtimezone"},"withTimeZone"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"withTimeZone"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"timeZone"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-26"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"timeZone")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string"))))),(0,i.kt)("h4",{id:"returns-27"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-28"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L66"},"types/IZonedDateTimeFns.ts:66")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"add"},"add"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"add"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"temporalDurationLike"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-27"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"temporalDurationLike")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))," ","|"," { ",(0,i.kt)("inlineCode",{parentName:"td"},"years?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"months?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"weeks?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"days?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"hours?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"minutes?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"seconds?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"milliseconds?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," }")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.overflow?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalOverflow"))))),(0,i.kt)("h4",{id:"returns-28"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-29"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L67"},"types/IZonedDateTimeFns.ts:67")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"subtract"},"subtract"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"subtract"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"temporalDurationLike"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-28"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"temporalDurationLike")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))," ","|"," { ",(0,i.kt)("inlineCode",{parentName:"td"},"years?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"months?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"weeks?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"days?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"hours?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"minutes?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"seconds?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," ; ",(0,i.kt)("inlineCode",{parentName:"td"},"milliseconds?"),": ",(0,i.kt)("inlineCode",{parentName:"td"},"number")," }")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.overflow?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalOverflow"))))),(0,i.kt)("h4",{id:"returns-29"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-30"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L83"},"types/IZonedDateTimeFns.ts:83")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"until"},"until"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"until"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"other"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))),(0,i.kt)("h4",{id:"parameters-29"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"other")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.largestUnit?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalSingularUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},"TemporalPluralUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"auto"'))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.smallestUnit?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalSingularUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},"TemporalPluralUnit"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingIncrement?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingMode?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalRoundingMode"))))),(0,i.kt)("h4",{id:"returns-30"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))),(0,i.kt)("h4",{id:"defined-in-31"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L99"},"types/IZonedDateTimeFns.ts:99")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"since"},"since"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"since"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"other"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))),(0,i.kt)("h4",{id:"parameters-30"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"other")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.largestUnit?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalSingularUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},"TemporalPluralUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"auto"'))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.smallestUnit?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalSingularUnit")," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},"TemporalPluralUnit"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingIncrement?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingMode?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalRoundingMode"))))),(0,i.kt)("h4",{id:"returns-31"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/Duration#duration"},(0,i.kt)("inlineCode",{parentName:"a"},"Duration"))),(0,i.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L109"},"types/IZonedDateTimeFns.ts:109")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"round"},"round"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"round"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-31"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.smallestUnit")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},'"day"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"hour"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"minute"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"second"')," ","|"," ",(0,i.kt)("inlineCode",{parentName:"td"},'"millisecond"'))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingIncrement?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.roundingMode?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalRoundingMode"))))),(0,i.kt)("h4",{id:"returns-32"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L119"},"types/IZonedDateTimeFns.ts:119")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"equals"},"equals"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"equals"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"other"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"parameters-32"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"other")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-33"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"boolean")),(0,i.kt)("h4",{id:"defined-in-34"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L127"},"types/IZonedDateTimeFns.ts:127")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"startofday"},"startOfDay"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"startOfDay"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-33"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-34"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-35"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L128"},"types/IZonedDateTimeFns.ts:128")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"toinstant"},"toInstant"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toInstant"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/Instant#instant"},(0,i.kt)("inlineCode",{parentName:"a"},"Instant"))),(0,i.kt)("h4",{id:"parameters-34"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-35"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/Instant#instant"},(0,i.kt)("inlineCode",{parentName:"a"},"Instant"))),(0,i.kt)("h4",{id:"defined-in-36"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L129"},"types/IZonedDateTimeFns.ts:129")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"todate"},"toDate"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toDate"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/Date#date"},(0,i.kt)("inlineCode",{parentName:"a"},"Date"))),(0,i.kt)("h4",{id:"parameters-35"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-36"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/Date#date"},(0,i.kt)("inlineCode",{parentName:"a"},"Date"))),(0,i.kt)("h4",{id:"defined-in-37"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L130"},"types/IZonedDateTimeFns.ts:130")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"totime"},"toTime"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toTime"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/Time#time"},(0,i.kt)("inlineCode",{parentName:"a"},"Time"))),(0,i.kt)("h4",{id:"parameters-36"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-37"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/Time#time"},(0,i.kt)("inlineCode",{parentName:"a"},"Time"))),(0,i.kt)("h4",{id:"defined-in-38"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L131"},"types/IZonedDateTimeFns.ts:131")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"todatetime"},"toDateTime"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toDateTime"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/DateTime#datetime"},(0,i.kt)("inlineCode",{parentName:"a"},"DateTime"))),(0,i.kt)("h4",{id:"parameters-37"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-38"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/DateTime#datetime"},(0,i.kt)("inlineCode",{parentName:"a"},"DateTime"))),(0,i.kt)("h4",{id:"defined-in-39"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L132"},"types/IZonedDateTimeFns.ts:132")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"toyearmonth"},"toYearMonth"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toYearMonth"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/YearMonth#yearmonth"},(0,i.kt)("inlineCode",{parentName:"a"},"YearMonth"))),(0,i.kt)("h4",{id:"parameters-38"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-39"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/YearMonth#yearmonth"},(0,i.kt)("inlineCode",{parentName:"a"},"YearMonth"))),(0,i.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L133"},"types/IZonedDateTimeFns.ts:133")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"tomonthday"},"toMonthDay"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"toMonthDay"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/MonthDay#monthday"},(0,i.kt)("inlineCode",{parentName:"a"},"MonthDay"))),(0,i.kt)("h4",{id:"parameters-39"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-40"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/MonthDay#monthday"},(0,i.kt)("inlineCode",{parentName:"a"},"MonthDay"))),(0,i.kt)("h4",{id:"defined-in-41"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L134"},"types/IZonedDateTimeFns.ts:134")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"getfields"},"getFields"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"getFields"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"Object")),(0,i.kt)("h4",{id:"parameters-40"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-41"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"Object")),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"day")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"hour")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"millisecond")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"minute")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"month")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"second")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"year")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"number"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"offset")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"timeZone")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string"))))),(0,i.kt)("h4",{id:"defined-in-42"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L135"},"types/IZonedDateTimeFns.ts:135")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"from"},"from"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"from"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"item"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"options?"),"): ",(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"parameters-41"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"item")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"any"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"Object"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.overflow?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalOverflow"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.disambiguation?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalDisambiguation"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"options.offset?")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"TemporalOffset"))))),(0,i.kt)("h4",{id:"returns-42"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("h4",{id:"defined-in-43"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L146"},"types/IZonedDateTimeFns.ts:146")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"compare"},"compare"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"compare"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"one"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"two"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"number")),(0,i.kt)("h4",{id:"parameters-42"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"one")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"two")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-43"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"number")),(0,i.kt)("h4",{id:"defined-in-44"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L154"},"types/IZonedDateTimeFns.ts:154")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"format"},"format"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"format"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"format"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"summary"))," Format the ZonedDateTime."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"description")),"\nReturn the formatted ZonedDateTime string in the given format."),(0,i.kt)("p",null,"The characters wrapped between two single quotes characters (') are escaped.\nTwo single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n(see the last example)"),(0,i.kt)("p",null,"Format of the string is based on Unicode Technical Standard #35:\n",(0,i.kt)("a",{parentName:"p",href:"https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table"},"https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table"),"\nwith a few additions (see note 7 below the table)."),(0,i.kt)("p",null,"Accepted patterns:"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Unit"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Pattern"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Result examples"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Notes"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Era"),(0,i.kt)("td",{parentName:"tr",align:"left"},"G..GGG"),(0,i.kt)("td",{parentName:"tr",align:"left"},"AD, BC"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"GGGG"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Anno Domini, Before Christ"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"GGGGG"),(0,i.kt)("td",{parentName:"tr",align:"left"},"A, B"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Calendar year"),(0,i.kt)("td",{parentName:"tr",align:"left"},"y"),(0,i.kt)("td",{parentName:"tr",align:"left"},"44, 1, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"yo"),(0,i.kt)("td",{parentName:"tr",align:"left"},"44th, 1st, 0th, 17th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4,5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"yy"),(0,i.kt)("td",{parentName:"tr",align:"left"},"44, 01, 00, 17"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"yyy"),(0,i.kt)("td",{parentName:"tr",align:"left"},"044, 001, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"yyyy"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0044, 0001, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"yyyyy"),(0,i.kt)("td",{parentName:"tr",align:"left"},"..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"2,4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Extended year"),(0,i.kt)("td",{parentName:"tr",align:"left"},"u"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-43, 0, 1, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"uu"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-43, 01, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"uuu"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-043, 001, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"uuuu"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-0043, 0001, 1900, 2017"),(0,i.kt)("td",{parentName:"tr",align:"left"},"4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"uuuuu"),(0,i.kt)("td",{parentName:"tr",align:"left"},"..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"2,4")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Quarter"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Q"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, 3, 4"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"Qo"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, 3rd, 4th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"QQ"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, 03, 04"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"QQQ"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Q1, Q2, Q3, Q4"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"QQQQ"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st quarter, 2nd quarter, ..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"QQQQQ"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, 3, 4"),(0,i.kt)("td",{parentName:"tr",align:"left"},"3")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Month"),(0,i.kt)("td",{parentName:"tr",align:"left"},"M"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, ..., 12"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"Mo"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 12th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"MM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 12"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"MMM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Jan, Feb, ..., Dec"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"MMMM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"January, February, ..., December"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"MMMMM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"J, F, ..., D"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"ISO week of year"),(0,i.kt)("td",{parentName:"tr",align:"left"},"I"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, ..., 53"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"Io"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 53th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"II"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 53"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Day of month"),(0,i.kt)("td",{parentName:"tr",align:"left"},"d"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, ..., 31"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"do"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 31st"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"dd"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 31"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"ISO day of week"),(0,i.kt)("td",{parentName:"tr",align:"left"},"i"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, 3, ..., 7"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"io"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 7th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"ii"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 07"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"iii"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Mon, Tue, Wed, ..., Sun"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"iiii"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Monday, Tuesday, ..., Sunday"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1,5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"iiiii"),(0,i.kt)("td",{parentName:"tr",align:"left"},"M, T, W, T, F, S, S"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"iiiiii"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Mo, Tu, We, Th, Fr, Sa, Su"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"AM, PM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"a..aa"),(0,i.kt)("td",{parentName:"tr",align:"left"},"AM, PM"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"aaa"),(0,i.kt)("td",{parentName:"tr",align:"left"},"am, pm"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"aaaa"),(0,i.kt)("td",{parentName:"tr",align:"left"},"a.m., p.m."),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"aaaaa"),(0,i.kt)("td",{parentName:"tr",align:"left"},"a, p"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"AM, PM, noon, midnight"),(0,i.kt)("td",{parentName:"tr",align:"left"},"b..bb"),(0,i.kt)("td",{parentName:"tr",align:"left"},"AM, PM, noon, midnight"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"bbb"),(0,i.kt)("td",{parentName:"tr",align:"left"},"am, pm, noon, midnight"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"bbbb"),(0,i.kt)("td",{parentName:"tr",align:"left"},"a.m., p.m., noon, midnight"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"bbbbb"),(0,i.kt)("td",{parentName:"tr",align:"left"},"a, p, n, mi"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Flexible day period"),(0,i.kt)("td",{parentName:"tr",align:"left"},"B..BBB"),(0,i.kt)("td",{parentName:"tr",align:"left"},"at night, in the morning, ..."),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"BBBB"),(0,i.kt)("td",{parentName:"tr",align:"left"},"at night, in the morning, ..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"BBBBB"),(0,i.kt)("td",{parentName:"tr",align:"left"},"at night, in the morning, ..."),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Hour ","[1-12]"),(0,i.kt)("td",{parentName:"tr",align:"left"},"h"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, ..., 11, 12"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"ho"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 11th, 12th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"hh"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 11, 12"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Hour ","[0-23]"),(0,i.kt)("td",{parentName:"tr",align:"left"},"H"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0, 1, 2, ..., 23"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"Ho"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0th, 1st, 2nd, ..., 23rd"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"HH"),(0,i.kt)("td",{parentName:"tr",align:"left"},"00, 01, 02, ..., 23"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Hour ","[0-11]"),(0,i.kt)("td",{parentName:"tr",align:"left"},"K"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1, 2, ..., 11, 0"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"Ko"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1st, 2nd, ..., 11th, 0th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"KK"),(0,i.kt)("td",{parentName:"tr",align:"left"},"01, 02, ..., 11, 00"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Hour ","[1-24]"),(0,i.kt)("td",{parentName:"tr",align:"left"},"k"),(0,i.kt)("td",{parentName:"tr",align:"left"},"24, 1, 2, ..., 23"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"ko"),(0,i.kt)("td",{parentName:"tr",align:"left"},"24th, 1st, 2nd, ..., 23rd"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"kk"),(0,i.kt)("td",{parentName:"tr",align:"left"},"24, 01, 02, ..., 23"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Minute"),(0,i.kt)("td",{parentName:"tr",align:"left"},"m"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0, 1, ..., 59"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"mo"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0th, 1st, ..., 59th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"mm"),(0,i.kt)("td",{parentName:"tr",align:"left"},"00, 01, ..., 59"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Second"),(0,i.kt)("td",{parentName:"tr",align:"left"},"s"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0, 1, ..., 59"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"so"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0th, 1st, ..., 59th"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"ss"),(0,i.kt)("td",{parentName:"tr",align:"left"},"00, 01, ..., 59"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Fraction of second"),(0,i.kt)("td",{parentName:"tr",align:"left"},"S"),(0,i.kt)("td",{parentName:"tr",align:"left"},"0, 1, ..., 9"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"SS"),(0,i.kt)("td",{parentName:"tr",align:"left"},"00, 01, ..., 99"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"SSS"),(0,i.kt)("td",{parentName:"tr",align:"left"},"000, 001, ..., 999"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"SSSS"),(0,i.kt)("td",{parentName:"tr",align:"left"},"..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"2")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timezone (ISO-8601 w/ Z)"),(0,i.kt)("td",{parentName:"tr",align:"left"},"X"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08, +0530, Z"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"XX"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-0800, +0530, Z"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"XXX"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08:00, +05:30, Z"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"XXXX"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-0800, +0530, Z, +123456"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"XXXXX"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08:00, +05:30, Z, +12:34:56"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timezone (ISO-8601 w/o Z)"),(0,i.kt)("td",{parentName:"tr",align:"left"},"x"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08, +0530, +00"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"xx"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-0800, +0530, +0000"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"xxx"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08:00, +05:30, +00:00"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"xxxx"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-0800, +0530, +0000, +123456"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"xxxxx"),(0,i.kt)("td",{parentName:"tr",align:"left"},"-08:00, +05:30, +00:00, +12:34:56"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timezone (GMT)"),(0,i.kt)("td",{parentName:"tr",align:"left"},"O...OOO"),(0,i.kt)("td",{parentName:"tr",align:"left"},"GMT-8, GMT+5:30, GMT+0"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"OOOO"),(0,i.kt)("td",{parentName:"tr",align:"left"},"GMT-08:00, GMT+05:30, GMT+00:00"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Timezone (specific non-locat.)"),(0,i.kt)("td",{parentName:"tr",align:"left"},"z...zzz"),(0,i.kt)("td",{parentName:"tr",align:"left"},"CST, CST, CST"),(0,i.kt)("td",{parentName:"tr",align:"left"})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"zzzz"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Central Standard Time"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Long localized date"),(0,i.kt)("td",{parentName:"tr",align:"left"},"P"),(0,i.kt)("td",{parentName:"tr",align:"left"},"04/29/1453"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PP"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Apr 29, 1453"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PPP"),(0,i.kt)("td",{parentName:"tr",align:"left"},"April 29th, 1453"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PPPP"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Friday, April 29th, 1453"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1,5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Long localized time"),(0,i.kt)("td",{parentName:"tr",align:"left"},"p"),(0,i.kt)("td",{parentName:"tr",align:"left"},"12:00 AM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"pp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"12:00:00 AM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"ppp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"12:00:00 AM CDT"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"pppp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"12:00:00 AM Central Daylight Time"),(0,i.kt)("td",{parentName:"tr",align:"left"},"1,5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},"Combination of date and time"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Pp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"04/29/1453, 12:00 AM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PPpp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Apr 29, 1453, 12:00:00 AM"),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PPPppp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"April 29th, 1453 at ..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"5")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"}),(0,i.kt)("td",{parentName:"tr",align:"left"},"PPPPpppp"),(0,i.kt)("td",{parentName:"tr",align:"left"},"Friday, April 29th, 1453 at ..."),(0,i.kt)("td",{parentName:"tr",align:"left"},"1,5")))),(0,i.kt)("p",null,"Notes:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Any sequence of the identical letters is a pattern, unless it is escaped by\nthe single quote characters (see below).\nIf the sequence is longer than listed in table (e.g. ",(0,i.kt)("inlineCode",{parentName:"p"},"EEEEEEEEEEE"),")\nthe output will be the same as default pattern for this unit, usually\nthe longest one (in case of ISO weekdays, ",(0,i.kt)("inlineCode",{parentName:"p"},"EEEE"),'). Default patterns for units\nare marked with "2" in the last column of the table.'),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMM') //=> 'Nov'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Some patterns could be unlimited length (such as ",(0,i.kt)("inlineCode",{parentName:"p"},"yyyyyyyy"),").\nThe output will be padded with zeros to match the length of the pattern."),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'yyyyyyyy') //=> '00002017'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"QQQQQ")," could be not strictly numerical in some locales.\nThese tokens represent the shortest form of the quarter.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"The main difference between ",(0,i.kt)("inlineCode",{parentName:"p"},"y")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"u")," patterns are B.C. years:"),(0,i.kt)("table",{parentName:"li"},(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Year"),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"y")),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"u")))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"AC 1"),(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"BC 1"),(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"0")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"BC 2"),(0,i.kt)("td",{parentName:"tr",align:null},"2"),(0,i.kt)("td",{parentName:"tr",align:null},"-1")))),(0,i.kt)("p",{parentName:"li"},"Also ",(0,i.kt)("inlineCode",{parentName:"p"},"yy")," always returns the last two digits of a year,\nwhile ",(0,i.kt)("inlineCode",{parentName:"p"},"uu")," pads single digit years to 2 characters and returns other years unchanged:"),(0,i.kt)("table",{parentName:"li"},(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Year"),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"yy")),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"uu")))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"01"),(0,i.kt)("td",{parentName:"tr",align:null},"01")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"14"),(0,i.kt)("td",{parentName:"tr",align:null},"14"),(0,i.kt)("td",{parentName:"tr",align:null},"14")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"376"),(0,i.kt)("td",{parentName:"tr",align:null},"76"),(0,i.kt)("td",{parentName:"tr",align:null},"376")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1453"),(0,i.kt)("td",{parentName:"tr",align:null},"53"),(0,i.kt)("td",{parentName:"tr",align:null},"1453"))))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"i"),": ISO day of week"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"I"),": ISO week of year"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"P"),": long localized date"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"p"),": long localized time")))),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,i.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"example"))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"// Represent 11 February 2014 in middle-endian format:\nvar result = format(\"2014-02-11T00:00:00+00:00[UTC]\", 'MM/dd/yyyy')\n//=> '02/11/2014'\n")),(0,i.kt)("h4",{id:"parameters-43"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"format")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"the string of tokens")))),(0,i.kt)("h4",{id:"returns-44"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("p",null,"the formatted date string"),(0,i.kt)("h4",{id:"defined-in-45"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L335"},"types/IZonedDateTimeFns.ts:335")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"chain"},"chain"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"chain"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"zonedDateTime"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"IZonedDateTimeChain")),(0,i.kt)("h4",{id:"parameters-44"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"zonedDateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/ZonedDateTime#zoneddatetime"},(0,i.kt)("inlineCode",{parentName:"a"},"ZonedDateTime")))))),(0,i.kt)("h4",{id:"returns-45"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"IZonedDateTimeChain")),(0,i.kt)("h4",{id:"defined-in-46"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IZonedDateTimeFns.ts#L336"},"types/IZonedDateTimeFns.ts:336")))}N.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/60342d05.f46bc39d.js b/assets/js/60342d05.c1a981a1.js similarity index 97% rename from assets/js/60342d05.f46bc39d.js rename to assets/js/60342d05.c1a981a1.js index e6c386b..ca99f94 100644 --- a/assets/js/60342d05.f46bc39d.js +++ b/assets/js/60342d05.c1a981a1.js @@ -1 +1 @@ -"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[922],{3905:function(t,e,a){a.d(e,{Zo:function(){return m},kt:function(){return h}});var n=a(7294);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function l(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function i(t){for(var e=1;e=0||(r[a]=t[a]);return r}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(r[a]=t[a])}return r}var p=n.createContext({}),o=function(t){var e=n.useContext(p),a=e;return t&&(a="function"==typeof t?t(e):i(i({},e),t)),a},m=function(t){var e=o(t.components);return n.createElement(p.Provider,{value:e},t.children)},k={inlineCode:"code",wrapper:function(t){var e=t.children;return n.createElement(n.Fragment,{},e)}},s=n.forwardRef((function(t,e){var a=t.components,r=t.mdxType,l=t.originalType,p=t.parentName,m=d(t,["components","mdxType","originalType","parentName"]),s=o(a),h=r,N=s["".concat(p,".").concat(h)]||s[h]||k[h]||l;return a?n.createElement(N,i(i({ref:e},m),{},{components:a})):n.createElement(N,i({ref:e},m))}));function h(t,e){var a=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var l=a.length,i=new Array(l);i[0]=s;var d={};for(var p in e)hasOwnProperty.call(e,p)&&(d[p]=e[p]);d.originalType=t,d.mdxType="string"==typeof t?t:r,i[1]=d;for(var o=2;o 'Nov'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"QQQQQ")," could be not strictly numerical in some locales.\nThese tokens represent the shortest form of the quarter.")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier")))),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,l.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},(0,l.kt)("inlineCode",{parentName:"strong"},"example"))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Represent 11 February 2014 in middle-endian format:\nvar result = format(\"--02-11\", 'MM/dd')\n//=> '02/11'\n")),(0,l.kt)("h4",{id:"parameters-11"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"monthDay")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/MonthDay#monthday"},(0,l.kt)("inlineCode",{parentName:"a"},"MonthDay"))),(0,l.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"format")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"string")),(0,l.kt)("td",{parentName:"tr",align:"left"},"the string of tokens")))),(0,l.kt)("h4",{id:"returns-11"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"string")),(0,l.kt)("p",null,"the formatted date string"),(0,l.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IMonthDayFns.ts#L98"},"types/IMonthDayFns.ts:98")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"chain"},"chain"),(0,l.kt)("p",null,"\u25b8 ",(0,l.kt)("strong",{parentName:"p"},"chain"),"(",(0,l.kt)("inlineCode",{parentName:"p"},"monthDay"),"): ",(0,l.kt)("inlineCode",{parentName:"p"},"IMonthDayChain")),(0,l.kt)("h4",{id:"parameters-12"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"monthDay")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/MonthDay#monthday"},(0,l.kt)("inlineCode",{parentName:"a"},"MonthDay")))))),(0,l.kt)("h4",{id:"returns-12"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"IMonthDayChain")),(0,l.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IMonthDayFns.ts#L99"},"types/IMonthDayFns.ts:99")))}s.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[922],{3905:function(t,e,a){a.d(e,{Zo:function(){return m},kt:function(){return h}});var n=a(7294);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function l(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function i(t){for(var e=1;e=0||(r[a]=t[a]);return r}(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(r[a]=t[a])}return r}var p=n.createContext({}),o=function(t){var e=n.useContext(p),a=e;return t&&(a="function"==typeof t?t(e):i(i({},e),t)),a},m=function(t){var e=o(t.components);return n.createElement(p.Provider,{value:e},t.children)},k={inlineCode:"code",wrapper:function(t){var e=t.children;return n.createElement(n.Fragment,{},e)}},s=n.forwardRef((function(t,e){var a=t.components,r=t.mdxType,l=t.originalType,p=t.parentName,m=d(t,["components","mdxType","originalType","parentName"]),s=o(a),h=r,N=s["".concat(p,".").concat(h)]||s[h]||k[h]||l;return a?n.createElement(N,i(i({ref:e},m),{},{components:a})):n.createElement(N,i({ref:e},m))}));function h(t,e){var a=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var l=a.length,i=new Array(l);i[0]=s;var d={};for(var p in e)hasOwnProperty.call(e,p)&&(d[p]=e[p]);d.originalType=t,d.mdxType="string"==typeof t?t:r,i[1]=d;for(var o=2;o 'Nov'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"QQQQQ")," could be not strictly numerical in some locales.\nThese tokens represent the shortest form of the quarter.")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier")))),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,l.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},(0,l.kt)("inlineCode",{parentName:"strong"},"example"))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Represent 11 February 2014 in middle-endian format:\nvar result = format(\"--02-11\", 'MM/dd')\n//=> '02/11'\n")),(0,l.kt)("h4",{id:"parameters-11"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"monthDay")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/MonthDay#monthday"},(0,l.kt)("inlineCode",{parentName:"a"},"MonthDay"))),(0,l.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"format")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"string")),(0,l.kt)("td",{parentName:"tr",align:"left"},"the string of tokens")))),(0,l.kt)("h4",{id:"returns-11"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"string")),(0,l.kt)("p",null,"the formatted date string"),(0,l.kt)("h4",{id:"defined-in-12"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IMonthDayFns.ts#L98"},"types/IMonthDayFns.ts:98")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"chain"},"chain"),(0,l.kt)("p",null,"\u25b8 ",(0,l.kt)("strong",{parentName:"p"},"chain"),"(",(0,l.kt)("inlineCode",{parentName:"p"},"monthDay"),"): ",(0,l.kt)("inlineCode",{parentName:"p"},"IMonthDayChain")),(0,l.kt)("h4",{id:"parameters-12"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"monthDay")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/MonthDay#monthday"},(0,l.kt)("inlineCode",{parentName:"a"},"MonthDay")))))),(0,l.kt)("h4",{id:"returns-12"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"IMonthDayChain")),(0,l.kt)("h4",{id:"defined-in-13"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IMonthDayFns.ts#L99"},"types/IMonthDayFns.ts:99")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/76c7778c.bb2879f2.js b/assets/js/76c7778c.2bf00806.js similarity index 97% rename from assets/js/76c7778c.bb2879f2.js rename to assets/js/76c7778c.2bf00806.js index dcc9cfa..ce636bb 100644 --- a/assets/js/76c7778c.bb2879f2.js +++ b/assets/js/76c7778c.2bf00806.js @@ -1 +1 @@ -"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[498],{3905:function(e,t,a){a.d(t,{Zo:function(){return m},kt:function(){return s}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),o=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},m=function(e){var t=o(e.components);return n.createElement(p.Provider,{value:t},e.children)},k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,m=d(e,["components","mdxType","originalType","parentName"]),N=o(a),s=r,h=N["".concat(p,".").concat(s)]||N[s]||k[s]||l;return a?n.createElement(h,i(i({ref:t},m),{},{components:a})):n.createElement(h,i({ref:t},m))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=N;var d={};for(var p in t)hasOwnProperty.call(t,p)&&(d[p]=t[p]);d.originalType=e,d.mdxType="string"==typeof e?e:r,i[1]=d;for(var o=2;o 'Nov'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Some patterns could be unlimited length (such as ",(0,l.kt)("inlineCode",{parentName:"p"},"yyyyyyyy"),").\nThe output will be padded with zeros to match the length of the pattern."),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'yyyyyyyy') //=> '00002017'"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"QQQQQ")," could be not strictly numerical in some locales.\nThese tokens represent the shortest form of the quarter.")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"The main difference between ",(0,l.kt)("inlineCode",{parentName:"p"},"y")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"u")," patterns are B.C. years:"),(0,l.kt)("table",{parentName:"li"},(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Year"),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"y")),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"u")))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"AC 1"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"1")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"BC 1"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"BC 2"),(0,l.kt)("td",{parentName:"tr",align:null},"2"),(0,l.kt)("td",{parentName:"tr",align:null},"-1")))),(0,l.kt)("p",{parentName:"li"},"Also ",(0,l.kt)("inlineCode",{parentName:"p"},"yy")," always returns the last two digits of a year,\nwhile ",(0,l.kt)("inlineCode",{parentName:"p"},"uu")," pads single digit years to 2 characters and returns other years unchanged:"),(0,l.kt)("table",{parentName:"li"},(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Year"),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"yy")),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"uu")))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"01"),(0,l.kt)("td",{parentName:"tr",align:null},"01")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"14"),(0,l.kt)("td",{parentName:"tr",align:null},"14"),(0,l.kt)("td",{parentName:"tr",align:null},"14")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"376"),(0,l.kt)("td",{parentName:"tr",align:null},"76"),(0,l.kt)("td",{parentName:"tr",align:null},"376")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1453"),(0,l.kt)("td",{parentName:"tr",align:null},"53"),(0,l.kt)("td",{parentName:"tr",align:null},"1453"))))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier")))),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,l.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},(0,l.kt)("inlineCode",{parentName:"strong"},"example"))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Represent 11 February 2014 in middle-endian format:\nvar result = format(\"2014-02\", 'MM/yyyy')\n//=> '02/2014'\n")),(0,l.kt)("h4",{id:"parameters-23"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"yearMonth")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/YearMonth#yearmonth"},(0,l.kt)("inlineCode",{parentName:"a"},"YearMonth"))),(0,l.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"format")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"string")),(0,l.kt)("td",{parentName:"tr",align:"left"},"the string of tokens")))),(0,l.kt)("h4",{id:"returns-23"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"string")),(0,l.kt)("p",null,"the formatted date string"),(0,l.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IYearMonthFns.ts#L189"},"types/IYearMonthFns.ts:189")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"chain"},"chain"),(0,l.kt)("p",null,"\u25b8 ",(0,l.kt)("strong",{parentName:"p"},"chain"),"(",(0,l.kt)("inlineCode",{parentName:"p"},"yearMonth"),"): ",(0,l.kt)("inlineCode",{parentName:"p"},"IYearMonthChain")),(0,l.kt)("h4",{id:"parameters-24"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"yearMonth")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/YearMonth#yearmonth"},(0,l.kt)("inlineCode",{parentName:"a"},"YearMonth")))))),(0,l.kt)("h4",{id:"returns-24"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"IYearMonthChain")),(0,l.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IYearMonthFns.ts#L190"},"types/IYearMonthFns.ts:190")))}N.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[498],{3905:function(e,t,a){a.d(t,{Zo:function(){return m},kt:function(){return s}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),o=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},m=function(e){var t=o(e.components);return n.createElement(p.Provider,{value:t},e.children)},k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,m=d(e,["components","mdxType","originalType","parentName"]),N=o(a),s=r,h=N["".concat(p,".").concat(s)]||N[s]||k[s]||l;return a?n.createElement(h,i(i({ref:t},m),{},{components:a})):n.createElement(h,i({ref:t},m))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=N;var d={};for(var p in t)hasOwnProperty.call(t,p)&&(d[p]=t[p]);d.originalType=e,d.mdxType="string"==typeof e?e:r,i[1]=d;for(var o=2;o 'Nov'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Some patterns could be unlimited length (such as ",(0,l.kt)("inlineCode",{parentName:"p"},"yyyyyyyy"),").\nThe output will be padded with zeros to match the length of the pattern."),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'yyyyyyyy') //=> '00002017'"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"QQQQQ")," could be not strictly numerical in some locales.\nThese tokens represent the shortest form of the quarter.")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"The main difference between ",(0,l.kt)("inlineCode",{parentName:"p"},"y")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"u")," patterns are B.C. years:"),(0,l.kt)("table",{parentName:"li"},(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Year"),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"y")),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"u")))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"AC 1"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"1")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"BC 1"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"BC 2"),(0,l.kt)("td",{parentName:"tr",align:null},"2"),(0,l.kt)("td",{parentName:"tr",align:null},"-1")))),(0,l.kt)("p",{parentName:"li"},"Also ",(0,l.kt)("inlineCode",{parentName:"p"},"yy")," always returns the last two digits of a year,\nwhile ",(0,l.kt)("inlineCode",{parentName:"p"},"uu")," pads single digit years to 2 characters and returns other years unchanged:"),(0,l.kt)("table",{parentName:"li"},(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Year"),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"yy")),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"uu")))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"01"),(0,l.kt)("td",{parentName:"tr",align:null},"01")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"14"),(0,l.kt)("td",{parentName:"tr",align:null},"14"),(0,l.kt)("td",{parentName:"tr",align:null},"14")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"376"),(0,l.kt)("td",{parentName:"tr",align:null},"76"),(0,l.kt)("td",{parentName:"tr",align:null},"376")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1453"),(0,l.kt)("td",{parentName:"tr",align:null},"53"),(0,l.kt)("td",{parentName:"tr",align:null},"1453"))))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier")))),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,l.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},(0,l.kt)("inlineCode",{parentName:"strong"},"example"))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Represent 11 February 2014 in middle-endian format:\nvar result = format(\"2014-02\", 'MM/yyyy')\n//=> '02/2014'\n")),(0,l.kt)("h4",{id:"parameters-23"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"yearMonth")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/YearMonth#yearmonth"},(0,l.kt)("inlineCode",{parentName:"a"},"YearMonth"))),(0,l.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"format")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"string")),(0,l.kt)("td",{parentName:"tr",align:"left"},"the string of tokens")))),(0,l.kt)("h4",{id:"returns-23"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"string")),(0,l.kt)("p",null,"the formatted date string"),(0,l.kt)("h4",{id:"defined-in-24"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IYearMonthFns.ts#L189"},"types/IYearMonthFns.ts:189")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"chain"},"chain"),(0,l.kt)("p",null,"\u25b8 ",(0,l.kt)("strong",{parentName:"p"},"chain"),"(",(0,l.kt)("inlineCode",{parentName:"p"},"yearMonth"),"): ",(0,l.kt)("inlineCode",{parentName:"p"},"IYearMonthChain")),(0,l.kt)("h4",{id:"parameters-24"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"yearMonth")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/YearMonth#yearmonth"},(0,l.kt)("inlineCode",{parentName:"a"},"YearMonth")))))),(0,l.kt)("h4",{id:"returns-24"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"IYearMonthChain")),(0,l.kt)("h4",{id:"defined-in-25"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IYearMonthFns.ts#L190"},"types/IYearMonthFns.ts:190")))}N.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/80327c84.5c09e9b0.js b/assets/js/80327c84.f5a31293.js similarity index 95% rename from assets/js/80327c84.5c09e9b0.js rename to assets/js/80327c84.f5a31293.js index af95ad0..c52394c 100644 --- a/assets/js/80327c84.5c09e9b0.js +++ b/assets/js/80327c84.f5a31293.js @@ -1 +1 @@ -"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[938],{3905:function(t,e,n){n.d(e,{Zo:function(){return o},kt:function(){return N}});var a=n(7294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function l(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var p=a.createContext({}),s=function(t){var e=a.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):l(l({},e),t)),n},o=function(t){var e=s(t.components);return a.createElement(p.Provider,{value:e},t.children)},m={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},k=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,i=t.originalType,p=t.parentName,o=d(t,["components","mdxType","originalType","parentName"]),k=s(n),N=r,u=k["".concat(p,".").concat(N)]||k[N]||m[N]||i;return n?a.createElement(u,l(l({ref:e},o),{},{components:n})):a.createElement(u,l({ref:e},o))}));function N(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var i=n.length,l=new Array(i);l[0]=k;var d={};for(var p in e)hasOwnProperty.call(e,p)&&(d[p]=e[p]);d.originalType=t,d.mdxType="string"==typeof t?t:r,l[1]=d;for(var s=2;s=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var p=a.createContext({}),s=function(t){var e=a.useContext(p),n=e;return t&&(n="function"==typeof t?t(e):l(l({},e),t)),n},o=function(t){var e=s(t.components);return a.createElement(p.Provider,{value:e},t.children)},m={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},k=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,i=t.originalType,p=t.parentName,o=d(t,["components","mdxType","originalType","parentName"]),k=s(n),N=r,u=k["".concat(p,".").concat(N)]||k[N]||m[N]||i;return n?a.createElement(u,l(l({ref:e},o),{},{components:n})):a.createElement(u,l({ref:e},o))}));function N(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var i=n.length,l=new Array(i);l[0]=k;var d={};for(var p in e)hasOwnProperty.call(e,p)&&(d[p]=e[p]);d.originalType=t,d.mdxType="string"==typeof t?t:r,l[1]=d;for(var s=2;s=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),m=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},k=function(e){var t=m(e.components);return n.createElement(p.Provider,{value:t},e.children)},o={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,k=d(e,["components","mdxType","originalType","parentName"]),N=m(a),s=r,f=N["".concat(p,".").concat(s)]||N[s]||o[s]||l;return a?n.createElement(f,i(i({ref:t},k),{},{components:a})):n.createElement(f,i({ref:t},k))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=N;var d={};for(var p in t)hasOwnProperty.call(t,p)&&(d[p]=t[p]);d.originalType=e,d.mdxType="string"==typeof e?e:r,i[1]=d;for(var m=2;m 'Nov'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Some patterns could be unlimited length (such as ",(0,l.kt)("inlineCode",{parentName:"p"},"yyyyyyyy"),").\nThe output will be padded with zeros to match the length of the pattern."),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'yyyyyyyy') //=> '00002017'"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"QQQQQ")," could be not strictly numerical in some locales.\nThese tokens represent the shortest form of the quarter.")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"The main difference between ",(0,l.kt)("inlineCode",{parentName:"p"},"y")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"u")," patterns are B.C. years:"),(0,l.kt)("table",{parentName:"li"},(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Year"),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"y")),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"u")))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"AC 1"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"1")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"BC 1"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"BC 2"),(0,l.kt)("td",{parentName:"tr",align:null},"2"),(0,l.kt)("td",{parentName:"tr",align:null},"-1")))),(0,l.kt)("p",{parentName:"li"},"Also ",(0,l.kt)("inlineCode",{parentName:"p"},"yy")," always returns the last two digits of a year,\nwhile ",(0,l.kt)("inlineCode",{parentName:"p"},"uu")," pads single digit years to 2 characters and returns other years unchanged:"),(0,l.kt)("table",{parentName:"li"},(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Year"),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"yy")),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"uu")))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"01"),(0,l.kt)("td",{parentName:"tr",align:null},"01")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"14"),(0,l.kt)("td",{parentName:"tr",align:null},"14"),(0,l.kt)("td",{parentName:"tr",align:null},"14")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"376"),(0,l.kt)("td",{parentName:"tr",align:null},"76"),(0,l.kt)("td",{parentName:"tr",align:null},"376")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1453"),(0,l.kt)("td",{parentName:"tr",align:null},"53"),(0,l.kt)("td",{parentName:"tr",align:null},"1453"))))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"i"),": ISO day of week"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"I"),": ISO week of year"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"P"),": long localized date"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"p"),": long localized time")))),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,l.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},(0,l.kt)("inlineCode",{parentName:"strong"},"example"))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Represent 11 February 2014 in middle-endian format:\nvar result = format(\"2014-02-11\", 'MM/dd/yyyy')\n//=> '02/11/2014'\n")),(0,l.kt)("h4",{id:"parameters-31"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"date")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/Date#date"},(0,l.kt)("inlineCode",{parentName:"a"},"Date"))),(0,l.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"format")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"string")),(0,l.kt)("td",{parentName:"tr",align:"left"},"the string of tokens")))),(0,l.kt)("h4",{id:"returns-31"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"string")),(0,l.kt)("p",null,"the formatted date string"),(0,l.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IDateFns.ts#L234"},"types/IDateFns.ts:234")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"chain"},"chain"),(0,l.kt)("p",null,"\u25b8 ",(0,l.kt)("strong",{parentName:"p"},"chain"),"(",(0,l.kt)("inlineCode",{parentName:"p"},"date"),"): ",(0,l.kt)("inlineCode",{parentName:"p"},"IDateChain")),(0,l.kt)("h4",{id:"parameters-32"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"date")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/Date#date"},(0,l.kt)("inlineCode",{parentName:"a"},"Date")))))),(0,l.kt)("h4",{id:"returns-32"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"IDateChain")),(0,l.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IDateFns.ts#L235"},"types/IDateFns.ts:235")))}N.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[823],{3905:function(e,t,a){a.d(t,{Zo:function(){return k},kt:function(){return s}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),m=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},k=function(e){var t=m(e.components);return n.createElement(p.Provider,{value:t},e.children)},o={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,k=d(e,["components","mdxType","originalType","parentName"]),N=m(a),s=r,u=N["".concat(p,".").concat(s)]||N[s]||o[s]||l;return a?n.createElement(u,i(i({ref:t},k),{},{components:a})):n.createElement(u,i({ref:t},k))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=N;var d={};for(var p in t)hasOwnProperty.call(t,p)&&(d[p]=t[p]);d.originalType=e,d.mdxType="string"==typeof e?e:r,i[1]=d;for(var m=2;m 'Nov'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"Some patterns could be unlimited length (such as ",(0,l.kt)("inlineCode",{parentName:"p"},"yyyyyyyy"),").\nThe output will be padded with zeros to match the length of the pattern."),(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'yyyyyyyy') //=> '00002017'"))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},(0,l.kt)("inlineCode",{parentName:"p"},"QQQQQ")," could be not strictly numerical in some locales.\nThese tokens represent the shortest form of the quarter.")),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"The main difference between ",(0,l.kt)("inlineCode",{parentName:"p"},"y")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"u")," patterns are B.C. years:"),(0,l.kt)("table",{parentName:"li"},(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Year"),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"y")),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"u")))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"AC 1"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"1")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"BC 1"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"BC 2"),(0,l.kt)("td",{parentName:"tr",align:null},"2"),(0,l.kt)("td",{parentName:"tr",align:null},"-1")))),(0,l.kt)("p",{parentName:"li"},"Also ",(0,l.kt)("inlineCode",{parentName:"p"},"yy")," always returns the last two digits of a year,\nwhile ",(0,l.kt)("inlineCode",{parentName:"p"},"uu")," pads single digit years to 2 characters and returns other years unchanged:"),(0,l.kt)("table",{parentName:"li"},(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Year"),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"yy")),(0,l.kt)("th",{parentName:"tr",align:null},(0,l.kt)("inlineCode",{parentName:"th"},"uu")))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"01"),(0,l.kt)("td",{parentName:"tr",align:null},"01")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"14"),(0,l.kt)("td",{parentName:"tr",align:null},"14"),(0,l.kt)("td",{parentName:"tr",align:null},"14")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"376"),(0,l.kt)("td",{parentName:"tr",align:null},"76"),(0,l.kt)("td",{parentName:"tr",align:null},"376")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"1453"),(0,l.kt)("td",{parentName:"tr",align:null},"53"),(0,l.kt)("td",{parentName:"tr",align:null},"1453"))))),(0,l.kt)("li",{parentName:"ol"},(0,l.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"i"),": ISO day of week"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"I"),": ISO week of year"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"P"),": long localized date"),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"p"),": long localized time")))),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,l.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},(0,l.kt)("inlineCode",{parentName:"strong"},"example"))),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Represent 11 February 2014 in middle-endian format:\nvar result = format(\"2014-02-11\", 'MM/dd/yyyy')\n//=> '02/11/2014'\n")),(0,l.kt)("h4",{id:"parameters-31"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"date")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/Date#date"},(0,l.kt)("inlineCode",{parentName:"a"},"Date"))),(0,l.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"format")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"string")),(0,l.kt)("td",{parentName:"tr",align:"left"},"the string of tokens")))),(0,l.kt)("h4",{id:"returns-31"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"string")),(0,l.kt)("p",null,"the formatted date string"),(0,l.kt)("h4",{id:"defined-in-32"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IDateFns.ts#L234"},"types/IDateFns.ts:234")),(0,l.kt)("hr",null),(0,l.kt)("h2",{id:"chain"},"chain"),(0,l.kt)("p",null,"\u25b8 ",(0,l.kt)("strong",{parentName:"p"},"chain"),"(",(0,l.kt)("inlineCode",{parentName:"p"},"date"),"): ",(0,l.kt)("inlineCode",{parentName:"p"},"IDateChain")),(0,l.kt)("h4",{id:"parameters-32"},"Parameters"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,l.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("inlineCode",{parentName:"td"},"date")),(0,l.kt)("td",{parentName:"tr",align:"left"},(0,l.kt)("a",{parentName:"td",href:"/docs/api/Date#date"},(0,l.kt)("inlineCode",{parentName:"a"},"Date")))))),(0,l.kt)("h4",{id:"returns-32"},"Returns"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"IDateChain")),(0,l.kt)("h4",{id:"defined-in-33"},"Defined in"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IDateFns.ts#L235"},"types/IDateFns.ts:235")))}N.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/93a296a9.4c4f509f.js b/assets/js/93a296a9.9a2e4e73.js similarity index 97% rename from assets/js/93a296a9.4c4f509f.js rename to assets/js/93a296a9.9a2e4e73.js index e56ecf4..86ba5ce 100644 --- a/assets/js/93a296a9.4c4f509f.js +++ b/assets/js/93a296a9.9a2e4e73.js @@ -1 +1 @@ -"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[998],{3905:function(e,t,a){a.d(t,{Zo:function(){return k},kt:function(){return s}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var m=n.createContext({}),p=function(e){var t=n.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},k=function(e){var t=p(e.components);return n.createElement(m.Provider,{value:t},e.children)},o={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,m=e.parentName,k=d(e,["components","mdxType","originalType","parentName"]),N=p(a),s=r,f=N["".concat(m,".").concat(s)]||N[s]||o[s]||i;return a?n.createElement(f,l(l({ref:t},k),{},{components:a})):n.createElement(f,l({ref:t},k))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=N;var d={};for(var m in t)hasOwnProperty.call(t,m)&&(d[m]=t[m]);d.originalType=e,d.mdxType="string"==typeof e?e:r,l[1]=d;for(var p=2;p 'Nov'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Some patterns could be unlimited length (such as ",(0,i.kt)("inlineCode",{parentName:"p"},"yyyyyyyy"),").\nThe output will be padded with zeros to match the length of the pattern."),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'yyyyyyyy') //=> '00002017'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"p"),": long localized time")))),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,i.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"example"))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},'// Escape string by single quote characters:\nvar result = format("15:00:00.000", "h \'o\'\'clock\'")\n//=> "3 o\'clock"\n')),(0,i.kt)("h4",{id:"parameters-20"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/Time#time"},(0,i.kt)("inlineCode",{parentName:"a"},"Time"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"format")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"the string of tokens")))),(0,i.kt)("h4",{id:"returns-20"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("p",null,"the formatted date string"),(0,i.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/ITimeFns.ts#L199"},"types/ITimeFns.ts:199")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"chain"},"chain"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"chain"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"time"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"ITimeChain")),(0,i.kt)("h4",{id:"parameters-21"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/Time#time"},(0,i.kt)("inlineCode",{parentName:"a"},"Time")))))),(0,i.kt)("h4",{id:"returns-21"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"ITimeChain")),(0,i.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/ITimeFns.ts#L200"},"types/ITimeFns.ts:200")))}N.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[998],{3905:function(e,t,a){a.d(t,{Zo:function(){return k},kt:function(){return s}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var m=n.createContext({}),p=function(e){var t=n.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},k=function(e){var t=p(e.components);return n.createElement(m.Provider,{value:t},e.children)},o={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,m=e.parentName,k=d(e,["components","mdxType","originalType","parentName"]),N=p(a),s=r,f=N["".concat(m,".").concat(s)]||N[s]||o[s]||i;return a?n.createElement(f,l(l({ref:t},k),{},{components:a})):n.createElement(f,l({ref:t},k))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=N;var d={};for(var m in t)hasOwnProperty.call(t,m)&&(d[m]=t[m]);d.originalType=e,d.mdxType="string"==typeof e?e:r,l[1]=d;for(var p=2;p 'Nov'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Some patterns could be unlimited length (such as ",(0,i.kt)("inlineCode",{parentName:"p"},"yyyyyyyy"),").\nThe output will be padded with zeros to match the length of the pattern."),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'yyyyyyyy') //=> '00002017'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"p"),": long localized time")))),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,i.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"example"))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},'// Escape string by single quote characters:\nvar result = format("15:00:00.000", "h \'o\'\'clock\'")\n//=> "3 o\'clock"\n')),(0,i.kt)("h4",{id:"parameters-20"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/Time#time"},(0,i.kt)("inlineCode",{parentName:"a"},"Time"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"format")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"the string of tokens")))),(0,i.kt)("h4",{id:"returns-20"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("p",null,"the formatted date string"),(0,i.kt)("h4",{id:"defined-in-21"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/ITimeFns.ts#L199"},"types/ITimeFns.ts:199")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"chain"},"chain"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"chain"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"time"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"ITimeChain")),(0,i.kt)("h4",{id:"parameters-21"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"time")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/Time#time"},(0,i.kt)("inlineCode",{parentName:"a"},"Time")))))),(0,i.kt)("h4",{id:"returns-21"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"ITimeChain")),(0,i.kt)("h4",{id:"defined-in-22"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/ITimeFns.ts#L200"},"types/ITimeFns.ts:200")))}N.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ee029c00.b3d084dd.js b/assets/js/ee029c00.7a6bc5fb.js similarity index 96% rename from assets/js/ee029c00.b3d084dd.js rename to assets/js/ee029c00.7a6bc5fb.js index 51c25fe..75a2f34 100644 --- a/assets/js/ee029c00.b3d084dd.js +++ b/assets/js/ee029c00.7a6bc5fb.js @@ -1 +1 @@ -"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[379],{3905:function(e,t,a){a.d(t,{Zo:function(){return m},kt:function(){return u}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),o=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},m=function(e){var t=o(e.components);return n.createElement(p.Provider,{value:t},e.children)},k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},s=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,m=d(e,["components","mdxType","originalType","parentName"]),s=o(a),u=r,N=s["".concat(p,".").concat(u)]||s[u]||k[u]||i;return a?n.createElement(N,l(l({ref:t},m),{},{components:a})):n.createElement(N,l({ref:t},m))}));function u(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=s;var d={};for(var p in t)hasOwnProperty.call(t,p)&&(d[p]=t[p]);d.originalType=e,d.mdxType="string"==typeof e?e:r,l[1]=d;for(var o=2;o=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),o=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},m=function(e){var t=o(e.components);return n.createElement(p.Provider,{value:t},e.children)},k={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},s=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,m=d(e,["components","mdxType","originalType","parentName"]),s=o(a),u=r,N=s["".concat(p,".").concat(u)]||s[u]||k[u]||i;return a?n.createElement(N,l(l({ref:t},m),{},{components:a})):n.createElement(N,l({ref:t},m))}));function u(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=s;var d={};for(var p in t)hasOwnProperty.call(t,p)&&(d[p]=t[p]);d.originalType=e,d.mdxType="string"==typeof e?e:r,l[1]=d;for(var o=2;o=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var m=n.createContext({}),p=function(e){var t=n.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},k=function(e){var t=p(e.components);return n.createElement(m.Provider,{value:t},e.children)},o={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,m=e.parentName,k=d(e,["components","mdxType","originalType","parentName"]),N=p(a),s=r,f=N["".concat(m,".").concat(s)]||N[s]||o[s]||i;return a?n.createElement(f,l(l({ref:t},k),{},{components:a})):n.createElement(f,l({ref:t},k))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=N;var d={};for(var m in t)hasOwnProperty.call(t,m)&&(d[m]=t[m]);d.originalType=e,d.mdxType="string"==typeof e?e:r,l[1]=d;for(var p=2;p 'Nov'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Some patterns could be unlimited length (such as ",(0,i.kt)("inlineCode",{parentName:"p"},"yyyyyyyy"),").\nThe output will be padded with zeros to match the length of the pattern."),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'yyyyyyyy') //=> '00002017'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"QQQQQ")," could be not strictly numerical in some locales.\nThese tokens represent the shortest form of the quarter.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"The main difference between ",(0,i.kt)("inlineCode",{parentName:"p"},"y")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"u")," patterns are B.C. years:"),(0,i.kt)("table",{parentName:"li"},(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Year"),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"y")),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"u")))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"AC 1"),(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"BC 1"),(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"0")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"BC 2"),(0,i.kt)("td",{parentName:"tr",align:null},"2"),(0,i.kt)("td",{parentName:"tr",align:null},"-1")))),(0,i.kt)("p",{parentName:"li"},"Also ",(0,i.kt)("inlineCode",{parentName:"p"},"yy")," always returns the last two digits of a year,\nwhile ",(0,i.kt)("inlineCode",{parentName:"p"},"uu")," pads single digit years to 2 characters and returns other years unchanged:"),(0,i.kt)("table",{parentName:"li"},(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Year"),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"yy")),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"uu")))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"01"),(0,i.kt)("td",{parentName:"tr",align:null},"01")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"14"),(0,i.kt)("td",{parentName:"tr",align:null},"14"),(0,i.kt)("td",{parentName:"tr",align:null},"14")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"376"),(0,i.kt)("td",{parentName:"tr",align:null},"76"),(0,i.kt)("td",{parentName:"tr",align:null},"376")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1453"),(0,i.kt)("td",{parentName:"tr",align:null},"53"),(0,i.kt)("td",{parentName:"tr",align:null},"1453"))))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"i"),": ISO day of week"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"I"),": ISO week of year"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"P"),": long localized date"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"p"),": long localized time")))),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,i.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"example"))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"// Represent 11 February 2014 in middle-endian format:\nvar result = format(\"2014-02-11T00:00:00.000\", 'MM/dd/yyyy')\n//=> '02/11/2014'\n")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"example"))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},'// Escape string by single quote characters:\nvar result = format("2014-02-11T15:00:00.000", "h \'o\'\'clock\'")\n//=> "3 o\'clock"\n')),(0,i.kt)("h4",{id:"parameters-39"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"dateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/DateTime#datetime"},(0,i.kt)("inlineCode",{parentName:"a"},"DateTime"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"formatString")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,i.kt)("h4",{id:"returns-39"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("p",null,"the formatted date string"),(0,i.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IDateTimeFns.ts#L309"},"types/IDateTimeFns.ts:309")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"chain"},"chain"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"chain"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"dateTime"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"IDateTimeChain")),(0,i.kt)("h4",{id:"parameters-40"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"dateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/DateTime#datetime"},(0,i.kt)("inlineCode",{parentName:"a"},"DateTime")))))),(0,i.kt)("h4",{id:"returns-40"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"IDateTimeChain")),(0,i.kt)("h4",{id:"defined-in-41"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/612715f/src/types/IDateTimeFns.ts#L310"},"types/IDateTimeFns.ts:310")))}N.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkiso_fns_docs=self.webpackChunkiso_fns_docs||[]).push([[801],{3905:function(e,t,a){a.d(t,{Zo:function(){return k},kt:function(){return s}});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var m=n.createContext({}),p=function(e){var t=n.useContext(m),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},k=function(e){var t=p(e.components);return n.createElement(m.Provider,{value:t},e.children)},o={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},N=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,m=e.parentName,k=d(e,["components","mdxType","originalType","parentName"]),N=p(a),s=r,f=N["".concat(m,".").concat(s)]||N[s]||o[s]||i;return a?n.createElement(f,l(l({ref:t},k),{},{components:a})):n.createElement(f,l({ref:t},k))}));function s(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,l=new Array(i);l[0]=N;var d={};for(var m in t)hasOwnProperty.call(t,m)&&(d[m]=t[m]);d.originalType=e,d.mdxType="string"==typeof e?e:r,l[1]=d;for(var p=2;p 'Nov'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMM') //=> 'N'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMM') //=> 'November'")),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'MMMMMMM') //=> 'November'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Some patterns could be unlimited length (such as ",(0,i.kt)("inlineCode",{parentName:"p"},"yyyyyyyy"),").\nThe output will be padded with zeros to match the length of the pattern."),(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"format(\"2017-11-06\", 'yyyyyyyy') //=> '00002017'"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"QQQQQ")," could be not strictly numerical in some locales.\nThese tokens represent the shortest form of the quarter.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"The main difference between ",(0,i.kt)("inlineCode",{parentName:"p"},"y")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"u")," patterns are B.C. years:"),(0,i.kt)("table",{parentName:"li"},(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Year"),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"y")),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"u")))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"AC 1"),(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"1")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"BC 1"),(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"0")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"BC 2"),(0,i.kt)("td",{parentName:"tr",align:null},"2"),(0,i.kt)("td",{parentName:"tr",align:null},"-1")))),(0,i.kt)("p",{parentName:"li"},"Also ",(0,i.kt)("inlineCode",{parentName:"p"},"yy")," always returns the last two digits of a year,\nwhile ",(0,i.kt)("inlineCode",{parentName:"p"},"uu")," pads single digit years to 2 characters and returns other years unchanged:"),(0,i.kt)("table",{parentName:"li"},(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Year"),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"yy")),(0,i.kt)("th",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"th"},"uu")))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1"),(0,i.kt)("td",{parentName:"tr",align:null},"01"),(0,i.kt)("td",{parentName:"tr",align:null},"01")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"14"),(0,i.kt)("td",{parentName:"tr",align:null},"14"),(0,i.kt)("td",{parentName:"tr",align:null},"14")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"376"),(0,i.kt)("td",{parentName:"tr",align:null},"76"),(0,i.kt)("td",{parentName:"tr",align:null},"376")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"1453"),(0,i.kt)("td",{parentName:"tr",align:null},"53"),(0,i.kt)("td",{parentName:"tr",align:null},"1453"))))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"These patterns are not in the Unicode Technical Standard #35:"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"i"),": ISO day of week"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"I"),": ISO week of year"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"o"),": ordinal number modifier"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"P"),": long localized date"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"p"),": long localized time")))),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Characters are escaped using single quote symbols (",(0,i.kt)("inlineCode",{parentName:"li"},"'"),").")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"example"))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"// Represent 11 February 2014 in middle-endian format:\nvar result = format(\"2014-02-11T00:00:00.000\", 'MM/dd/yyyy')\n//=> '02/11/2014'\n")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"example"))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},'// Escape string by single quote characters:\nvar result = format("2014-02-11T15:00:00.000", "h \'o\'\'clock\'")\n//=> "3 o\'clock"\n')),(0,i.kt)("h4",{id:"parameters-39"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Description"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"dateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/DateTime#datetime"},(0,i.kt)("inlineCode",{parentName:"a"},"DateTime"))),(0,i.kt)("td",{parentName:"tr",align:"left"},"the original date")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"formatString")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"string")),(0,i.kt)("td",{parentName:"tr",align:"left"},"-")))),(0,i.kt)("h4",{id:"returns-39"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"string")),(0,i.kt)("p",null,"the formatted date string"),(0,i.kt)("h4",{id:"defined-in-40"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IDateTimeFns.ts#L309"},"types/IDateTimeFns.ts:309")),(0,i.kt)("hr",null),(0,i.kt)("h2",{id:"chain"},"chain"),(0,i.kt)("p",null,"\u25b8 ",(0,i.kt)("strong",{parentName:"p"},"chain"),"(",(0,i.kt)("inlineCode",{parentName:"p"},"dateTime"),"): ",(0,i.kt)("inlineCode",{parentName:"p"},"IDateTimeChain")),(0,i.kt)("h4",{id:"parameters-40"},"Parameters"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:"left"},"Name"),(0,i.kt)("th",{parentName:"tr",align:"left"},"Type"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("inlineCode",{parentName:"td"},"dateTime")),(0,i.kt)("td",{parentName:"tr",align:"left"},(0,i.kt)("a",{parentName:"td",href:"/docs/api/DateTime#datetime"},(0,i.kt)("inlineCode",{parentName:"a"},"DateTime")))))),(0,i.kt)("h4",{id:"returns-40"},"Returns"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"IDateTimeChain")),(0,i.kt)("h4",{id:"defined-in-41"},"Defined in"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/rubber-duck-software/iso-fns/blob/7616628/src/types/IDateTimeFns.ts#L310"},"types/IDateTimeFns.ts:310")))}N.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.4f8ab7d4.js b/assets/js/runtime~main.4f8ab7d4.js new file mode 100644 index 0000000..f0f3be7 --- /dev/null +++ b/assets/js/runtime~main.4f8ab7d4.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,n,r,o,c={},f={};function u(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={id:e,loaded:!1,exports:{}};return c[e].call(n.exports,n,n.exports,u),n.loaded=!0,n.exports}u.m=c,u.c=f,e=[],u.O=function(t,n,r,o){if(!n){var c=1/0;for(d=0;d=o)&&Object.keys(u.O).every((function(e){return u.O[e](n[i])}))?n.splice(i--,1):(f=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},u.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);u.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var f=2&r&&e;"object"==typeof f&&!~t.indexOf(f);f=n(f))Object.getOwnPropertyNames(f).forEach((function(t){c[t]=function(){return e[t]}}));return c.default=function(){return e},u.d(o,c),o},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.f={},u.e=function(e){return Promise.all(Object.keys(u.f).reduce((function(t,n){return u.f[n](e,t),t}),[]))},u.u=function(e){return"assets/js/"+({53:"935f2afb",189:"9ccecf1e",195:"c4f5d8e4",361:"be62ba7e",379:"ee029c00",477:"b2f554cd",496:"801f3f5d",498:"76c7778c",514:"1be78505",608:"9e4087bc",621:"e6ccb422",671:"0e384e19",801:"f5d67be2",823:"88865f51",843:"130897a7",918:"17896441",922:"60342d05",925:"2814a0e7",938:"80327c84",998:"93a296a9"}[e]||e)+"."+{53:"3a9d9c1f",75:"621d15f5",105:"56ef5f1f",189:"6b628a96",195:"85520e2f",256:"b874911a",262:"bef76c98",361:"e7b3ef78",379:"7a6bc5fb",477:"84cf5d5a",496:"96bc1b4e",498:"2bf00806",514:"1ea83709",608:"7680e03e",621:"2777fa7c",667:"a97fce43",671:"98155068",801:"616fe1c8",823:"51a9d29f",831:"c47acb32",843:"207120b1",918:"05a748fa",922:"c1a981a1",925:"d97a8a02",938:"f5a31293",945:"3a3bfad7",979:"bc0ea5c9",998:"9a2e4e73"}[e]+".js"},u.miniCssF=function(e){return"assets/css/styles.b8ed3faf.css"},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="iso-fns-docs:",u.l=function(e,t,n,c){if(r[e])r[e].push(t);else{var f,i;if(void 0!==n)for(var a=document.getElementsByTagName("script"),d=0;d=o)&&Object.keys(a.O).every((function(e){return a.O[e](n[u])}))?n.splice(u--,1):(f=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},a.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);a.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var f=2&r&&e;"object"==typeof f&&!~t.indexOf(f);f=n(f))Object.getOwnPropertyNames(f).forEach((function(t){c[t]=function(){return e[t]}}));return c.default=function(){return e},a.d(o,c),o},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce((function(t,n){return a.f[n](e,t),t}),[]))},a.u=function(e){return"assets/js/"+({53:"935f2afb",189:"9ccecf1e",195:"c4f5d8e4",361:"be62ba7e",379:"ee029c00",477:"b2f554cd",496:"801f3f5d",498:"76c7778c",514:"1be78505",608:"9e4087bc",621:"e6ccb422",671:"0e384e19",801:"f5d67be2",823:"88865f51",843:"130897a7",918:"17896441",922:"60342d05",925:"2814a0e7",938:"80327c84",998:"93a296a9"}[e]||e)+"."+{53:"3a9d9c1f",75:"621d15f5",105:"56ef5f1f",189:"6b628a96",195:"85520e2f",256:"b874911a",262:"bef76c98",361:"e7b3ef78",379:"b3d084dd",477:"84cf5d5a",496:"96bc1b4e",498:"bb2879f2",514:"1ea83709",608:"7680e03e",621:"2777fa7c",667:"a97fce43",671:"98155068",801:"ebfcf314",823:"db33379e",831:"c47acb32",843:"207120b1",918:"05a748fa",922:"f46bc39d",925:"5b1aa2cd",938:"5c09e9b0",945:"3a3bfad7",979:"bc0ea5c9",998:"4c4f509f"}[e]+".js"},a.miniCssF=function(e){return"assets/css/styles.b8ed3faf.css"},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="iso-fns-docs:",a.l=function(e,t,n,c){if(r[e])r[e].push(t);else{var f,u;if(void 0!==n)for(var i=document.getElementsByTagName("script"),d=0;d Archive | iso-fns - +

Archive

Archive

- + \ No newline at end of file diff --git a/docs/api/Date/index.html b/docs/api/Date/index.html index c6d665a..2c49230 100644 --- a/docs/api/Date/index.html +++ b/docs/api/Date/index.html @@ -5,12 +5,12 @@ Date | iso-fns - +
-

Date

Ζ¬ Date: Format["YYYY-MM-DD"] & string

An Iso.Date represents a calendar date. "Calendar date" refers to the concept of a date as expressed in everyday usage, independent of any time zone. For example, it could be used to represent an event on a calendar which happens during the whole day no matter which time zone it's happening in.

Iso.Date refers to the whole of a specific day; if you need to refer to a specific time on that day, use Iso.DateTime. An Iso.Date can be converted into a Iso.ZonedDateTime by combining it with a Iso.Time and Iso.TimeZone using the toZonedDateTime() function. It can also be combined with a Iso.Time to yield a "zoneless" Iso.DateTime using the toDateTime() method.

Iso.YearMonth and Iso.MonthDay carry less information than Iso.Date and should be used when complete information is not required.

Defined in

iso-types.ts:66

now

β–Έ now(timeZone?): Date

This method gets the current calendar date according to the system settings. Optionally a time zone can be given in which the time is computed, instead of the current system time zone.

Parameters

NameTypeDescription
timeZone?stringThe time zone to get the current date and time in, as a string. If not given, the current system time zone will be used.

Returns

Date

an Iso.Date string representing the date.

Defined in

types/IDateFns.ts:16


fromNumbers

β–Έ fromNumbers(year, month, day): Date

Parameters

NameType
yearnumber
monthnumber
daynumber

Returns

Date

Defined in

types/IDateFns.ts:17


isValid

β–Έ isValid(date): date is Date

Parameters

NameType
dateunknown

Returns

date is Date

Defined in

types/IDateFns.ts:18


assertIsValid

β–Έ assertIsValid(date): asserts date is Date

Parameters

NameType
dateunknown

Returns

asserts date is Date

Defined in

types/IDateFns.ts:19


getYear

β–Έ getYear(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:20


getMonth

β–Έ getMonth(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:21


getDay

β–Έ getDay(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:22


getDayOfWeek

β–Έ getDayOfWeek(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:23


getDayOfYear

β–Έ getDayOfYear(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:24


getWeekOfYear

β–Έ getWeekOfYear(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:25


getDaysInMonth

β–Έ getDaysInMonth(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:26


getDaysInYear

β–Έ getDaysInYear(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:27


inLeapYear

β–Έ inLeapYear(date): boolean

Parameters

NameType
dateDate

Returns

boolean

Defined in

types/IDateFns.ts:28


with

β–Έ with(dateTime, temporalDateLike, options?): Date

Parameters

NameType
dateTimeDate
temporalDateLikeObject
temporalDateLike.day?number
temporalDateLike.month?number
temporalDateLike.year?number
options?Object
options.overflow?TemporalOverflow

Returns

Date

Defined in

types/IDateFns.ts:29


add

β–Έ add(date, temporalDurationLike, options?): Date

Parameters

NameType
dateDate
temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
options?Object
options.overflow?TemporalOverflow

Returns

Date

Defined in

types/IDateFns.ts:40


subtract

β–Έ subtract(date, temporalDurationLike, options?): Date

Parameters

NameType
dateDate
temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
options?Object
options.overflow?TemporalOverflow

Returns

Date

Defined in

types/IDateFns.ts:56


until

β–Έ until(date, other, options?): Duration

Parameters

NameType
dateDate
otherDate
options?Object
options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
options.roundingIncrement?number
options.roundingMode?TemporalRoundingMode

Returns

Duration

Defined in

types/IDateFns.ts:72


since

β–Έ since(date, other, options?): Duration

Parameters

NameType
dateDate
otherDate
options?Object
options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
options.roundingIncrement?number
options.roundingMode?TemporalRoundingMode

Returns

Duration

Defined in

types/IDateFns.ts:82


equals

β–Έ equals(date, other): boolean

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:92


isEqual

β–Έ isEqual(date, other): boolean

alias for equals

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:96


isBefore

β–Έ isBefore(date, other): boolean

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:97


isAfter

β–Έ isAfter(date, other): boolean

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:98


isEqualOrBefore

β–Έ isEqualOrBefore(date, other): boolean

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:99


isEqualOrAfter

β–Έ isEqualOrAfter(date, other): boolean

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:100


toDateTime

β–Έ toDateTime(date, time?): DateTime

Parameters

NameType
dateDate
time?Time

Returns

DateTime

Defined in

types/IDateFns.ts:101


toZonedDateTime

β–Έ toZonedDateTime(date, item): ZonedDateTime

Parameters

NameType
dateDate
itemstring | { timeZone: string ; time?: Time }

Returns

ZonedDateTime

Defined in

types/IDateFns.ts:102


toYearMonth

β–Έ toYearMonth(date): YearMonth

Parameters

NameType
dateDate

Returns

YearMonth

Defined in

types/IDateFns.ts:103


toMonthDay

β–Έ toMonthDay(date): MonthDay

Parameters

NameType
dateDate

Returns

MonthDay

Defined in

types/IDateFns.ts:104


getFields

β–Έ getFields(date): DateSlots

Parameters

NameType
dateDate

Returns

DateSlots

Defined in

types/IDateFns.ts:105


from

β–Έ from(item, options?): Date

Parameters

NameType
itemany
options?Object
options.overflowTemporalOverflow

Returns

Date

Defined in

types/IDateFns.ts:106


compare

β–Έ compare(one, two): number

Parameters

NameType
oneDate
twoDate

Returns

number

Defined in

types/IDateFns.ts:107


format

β–Έ format(date, format): string

summary Format the ZonedDateTime.

description +

Date

Ζ¬ Date: Format["YYYY-MM-DD"] & string

An Iso.Date represents a calendar date. "Calendar date" refers to the concept of a date as expressed in everyday usage, independent of any time zone. For example, it could be used to represent an event on a calendar which happens during the whole day no matter which time zone it's happening in.

Iso.Date refers to the whole of a specific day; if you need to refer to a specific time on that day, use Iso.DateTime. An Iso.Date can be converted into a Iso.ZonedDateTime by combining it with a Iso.Time and Iso.TimeZone using the toZonedDateTime() function. It can also be combined with a Iso.Time to yield a "zoneless" Iso.DateTime using the toDateTime() method.

Iso.YearMonth and Iso.MonthDay carry less information than Iso.Date and should be used when complete information is not required.

Defined in

iso-types.ts:66

now

β–Έ now(timeZone?): Date

This method gets the current calendar date according to the system settings. Optionally a time zone can be given in which the time is computed, instead of the current system time zone.

Parameters

NameTypeDescription
timeZone?stringThe time zone to get the current date and time in, as a string. If not given, the current system time zone will be used.

Returns

Date

an Iso.Date string representing the date.

Defined in

types/IDateFns.ts:16


fromNumbers

β–Έ fromNumbers(year, month, day): Date

Parameters

NameType
yearnumber
monthnumber
daynumber

Returns

Date

Defined in

types/IDateFns.ts:17


isValid

β–Έ isValid(date): date is Date

Parameters

NameType
dateunknown

Returns

date is Date

Defined in

types/IDateFns.ts:18


assertIsValid

β–Έ assertIsValid(date): asserts date is Date

Parameters

NameType
dateunknown

Returns

asserts date is Date

Defined in

types/IDateFns.ts:19


getYear

β–Έ getYear(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:20


getMonth

β–Έ getMonth(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:21


getDay

β–Έ getDay(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:22


getDayOfWeek

β–Έ getDayOfWeek(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:23


getDayOfYear

β–Έ getDayOfYear(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:24


getWeekOfYear

β–Έ getWeekOfYear(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:25


getDaysInMonth

β–Έ getDaysInMonth(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:26


getDaysInYear

β–Έ getDaysInYear(date): number

Parameters

NameType
dateDate

Returns

number

Defined in

types/IDateFns.ts:27


inLeapYear

β–Έ inLeapYear(date): boolean

Parameters

NameType
dateDate

Returns

boolean

Defined in

types/IDateFns.ts:28


with

β–Έ with(dateTime, temporalDateLike, options?): Date

Parameters

NameType
dateTimeDate
temporalDateLikeObject
temporalDateLike.day?number
temporalDateLike.month?number
temporalDateLike.year?number
options?Object
options.overflow?TemporalOverflow

Returns

Date

Defined in

types/IDateFns.ts:29


add

β–Έ add(date, temporalDurationLike, options?): Date

Parameters

NameType
dateDate
temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
options?Object
options.overflow?TemporalOverflow

Returns

Date

Defined in

types/IDateFns.ts:40


subtract

β–Έ subtract(date, temporalDurationLike, options?): Date

Parameters

NameType
dateDate
temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
options?Object
options.overflow?TemporalOverflow

Returns

Date

Defined in

types/IDateFns.ts:56


until

β–Έ until(date, other, options?): Duration

Parameters

NameType
dateDate
otherDate
options?Object
options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
options.roundingIncrement?number
options.roundingMode?TemporalRoundingMode

Returns

Duration

Defined in

types/IDateFns.ts:72


since

β–Έ since(date, other, options?): Duration

Parameters

NameType
dateDate
otherDate
options?Object
options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
options.roundingIncrement?number
options.roundingMode?TemporalRoundingMode

Returns

Duration

Defined in

types/IDateFns.ts:82


equals

β–Έ equals(date, other): boolean

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:92


isEqual

β–Έ isEqual(date, other): boolean

alias for equals

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:96


isBefore

β–Έ isBefore(date, other): boolean

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:97


isAfter

β–Έ isAfter(date, other): boolean

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:98


isEqualOrBefore

β–Έ isEqualOrBefore(date, other): boolean

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:99


isEqualOrAfter

β–Έ isEqualOrAfter(date, other): boolean

Parameters

NameType
dateDate
otherDate

Returns

boolean

Defined in

types/IDateFns.ts:100


toDateTime

β–Έ toDateTime(date, time?): DateTime

Parameters

NameType
dateDate
time?Time

Returns

DateTime

Defined in

types/IDateFns.ts:101


toZonedDateTime

β–Έ toZonedDateTime(date, item): ZonedDateTime

Parameters

NameType
dateDate
itemstring | { timeZone: string ; time?: Time }

Returns

ZonedDateTime

Defined in

types/IDateFns.ts:102


toYearMonth

β–Έ toYearMonth(date): YearMonth

Parameters

NameType
dateDate

Returns

YearMonth

Defined in

types/IDateFns.ts:103


toMonthDay

β–Έ toMonthDay(date): MonthDay

Parameters

NameType
dateDate

Returns

MonthDay

Defined in

types/IDateFns.ts:104


getFields

β–Έ getFields(date): DateSlots

Parameters

NameType
dateDate

Returns

DateSlots

Defined in

types/IDateFns.ts:105


from

β–Έ from(item, options?): Date

Parameters

NameType
itemany
options?Object
options.overflowTemporalOverflow

Returns

Date

Defined in

types/IDateFns.ts:106


compare

β–Έ compare(one, two): number

Parameters

NameType
oneDate
twoDate

Returns

number

Defined in

types/IDateFns.ts:107


format

β–Έ format(date, format): string

summary Format the ZonedDateTime.

description Return the formatted ZonedDateTime string in the given format.

The characters wrapped between two single quotes characters (') are escaped. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. (see the last example)

Format of the string is based on Unicode Technical Standard #35: @@ -23,8 +23,8 @@ are marked with "2" in the last column of the table.

format("2017-11-06", 'MMM') //=> 'Nov'

format("2017-11-06", 'MMMM') //=> 'November'

format("2017-11-06", 'MMMMM') //=> 'N'

format("2017-11-06", 'MMMMMM') //=> 'November'

format("2017-11-06", 'MMMMMMM') //=> 'November'

  • Some patterns could be unlimited length (such as yyyyyyyy). The output will be padded with zeros to match the length of the pattern.

    format("2017-11-06", 'yyyyyyyy') //=> '00002017'

  • QQQQQ could be not strictly numerical in some locales. These tokens represent the shortest form of the quarter.

  • The main difference between y and u patterns are B.C. years:

    Yearyu
    AC 111
    BC 110
    BC 22-1

    Also yy always returns the last two digits of a year, -while uu pads single digit years to 2 characters and returns other years unchanged:

    Yearyyuu
    10101
    141414
    37676376
    1453531453
  • These patterns are not in the Unicode Technical Standard #35:

    • i: ISO day of week
    • I: ISO week of year
    • o: ordinal number modifier
    • P: long localized date
    • p: long localized time
    • Characters are escaped using single quote symbols (').

    example

    // Represent 11 February 2014 in middle-endian format:
    var result = format("2014-02-11", 'MM/dd/yyyy')
    //=> '02/11/2014'

    Parameters

    NameTypeDescription
    dateDatethe original date
    formatstringthe string of tokens

    Returns

    string

    the formatted date string

    Defined in

    types/IDateFns.ts:234


    chain

    β–Έ chain(date): IDateChain

    Parameters

    NameType
    dateDate

    Returns

    IDateChain

    Defined in

    types/IDateFns.ts:235

    - +while uu pads single digit years to 2 characters and returns other years unchanged:

    Yearyyuu
    10101
    141414
    37676376
    1453531453
  • These patterns are not in the Unicode Technical Standard #35:

    • i: ISO day of week
    • I: ISO week of year
    • o: ordinal number modifier
    • P: long localized date
    • p: long localized time
    • Characters are escaped using single quote symbols (').

    example

    // Represent 11 February 2014 in middle-endian format:
    var result = format("2014-02-11", 'MM/dd/yyyy')
    //=> '02/11/2014'

    Parameters

    NameTypeDescription
    dateDatethe original date
    formatstringthe string of tokens

    Returns

    string

    the formatted date string

    Defined in

    types/IDateFns.ts:234


    chain

    β–Έ chain(date): IDateChain

    Parameters

    NameType
    dateDate

    Returns

    IDateChain

    Defined in

    types/IDateFns.ts:235

    + \ No newline at end of file diff --git a/docs/api/DateTime/index.html b/docs/api/DateTime/index.html index 53e70a0..66882c2 100644 --- a/docs/api/DateTime/index.html +++ b/docs/api/DateTime/index.html @@ -5,13 +5,13 @@ DateTime | iso-fns - +

    DateTime

    Ζ¬ DateTime: Format["YYYY-MM-DDThh:mm-ss[.sss]"] & string

    An Iso.DateTime represents a calendar date and wall-clock time, with a precision in milliseconds, and without any time zone.

    For use cases that require a time zone, especially using arithmetic or other derived values, consider using Iso.ZonedDateTime instead because that type automatically adjusts for Daylight Saving Time. A Iso.DateTime can be converted to a Iso.ZonedDateTime using a Iso.TimeZone.

    Iso.Date, Iso.Time, Iso.YearMonth, and Iso.MonthDay all carry less information and should be used when complete information is not required.

    A Iso.DateTime can be converted into any of the types mentioned above using conversion methods like toZonedDateTime or toDate.

    Because Iso.DateTime does not represent an exact point in time, most date/time use cases are better handled using exact time types like Iso.ZonedDateTime and Iso.Instant. But there are cases where Iso.DateTime is the correct type to use:

    • Representing timezone-specific events where the time zone is not stored together with the date/time data. In this case, Iso.DateTime is an intermediate step before converting to/from Iso.ZonedDateTime or Iso.Instant using the separate time zone. Examples:
      • When the time zone is stored separately in a separate database column or a per-user setting.
      • Implicit time zones, e.g. stock exchange data that is always America/New_York
      • Interacting with poorly-designed legacy systems that record data in the server's non-UTC time zone.
    • Passing data to/from a component that is unaware of time zones, e.g. a UI date/time picker.
    • Modeling events that happen at the same local time in every time zone. For example, the British Commonwealth observes a two minute silence every November 11th at 11:00AM in local time.
    • When time zone is irrelevant, e.g. a sleep tracking device that only cares about the local time you went to sleep and woke up, regardless of where in the world you are.
    • Parsing local time from ISO 8601 strings like 2020-04-09T16:08-08:00 that have a numeric offset without an IANA time zone like America/Los_Angeles. These strings can also be parsed by Iso.Instant, but to parse the local date and time then dateTimeFns.from is required.
    • Performing arithmetic that deliberately ignores DST. Example: in a day-planner UI, the visual height of a meeting may be the same even if DST skips or repeats an hour. -To learn more about time zones and DST best practices, visit Time Zones and Resolving Ambiguity.

    Defined in

    iso-types.ts:97

    now

    β–Έ now(timeZone?): DateTime

    This method gets the current calendar date and wall-clock time according to the system settings. Optionally a time zone can be given in which the time is computed, instead of the current system time zone.

    Parameters

    NameTypeDescription
    timeZone?stringThe time zone to get the current date and time in, as a string. If not given, the current system time zone will be used.

    Returns

    DateTime

    an Iso.DateTime string representing the date and time.

    Defined in

    types/IDateTimeFns.ts:17


    fromNumbers

    β–Έ fromNumbers(year, month, day, hour?, minute?, second?, millisecond?): DateTime

    Parameters

    NameType
    yearnumber
    monthnumber
    daynumber
    hour?number
    minute?number
    second?number
    millisecond?number

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:18


    isValid

    β–Έ isValid(dateTime): dateTime is DateTime

    Parameters

    NameType
    dateTimeunknown

    Returns

    dateTime is DateTime

    Defined in

    types/IDateTimeFns.ts:27


    assertIsValid

    β–Έ assertIsValid(dateTime): asserts dateTime is DateTime

    Parameters

    NameType
    dateTimeunknown

    Returns

    asserts dateTime is DateTime

    Defined in

    types/IDateTimeFns.ts:28


    getYear

    β–Έ getYear(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:29


    getMonth

    β–Έ getMonth(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:30


    getDay

    β–Έ getDay(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:31


    getHour

    β–Έ getHour(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:32


    getMinute

    β–Έ getMinute(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:33


    getSecond

    β–Έ getSecond(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:34


    getMillisecond

    β–Έ getMillisecond(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:35


    getDayOfWeek

    β–Έ getDayOfWeek(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:36


    getDayOfYear

    β–Έ getDayOfYear(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:37


    getWeekOfYear

    β–Έ getWeekOfYear(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:38


    getDaysInYear

    β–Έ getDaysInYear(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:39


    getDaysInMonth

    β–Έ getDaysInMonth(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:40


    getInLeapYear

    β–Έ getInLeapYear(dateTime): boolean

    Parameters

    NameType
    dateTimeDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:41


    with

    β–Έ with(dateTime, temporalDateTimeLike, options?): DateTime

    Parameters

    NameType
    dateTimeDateTime
    temporalDateTimeLikeObject
    temporalDateTimeLike.day?number
    temporalDateTimeLike.hour?number
    temporalDateTimeLike.millisecond?number
    temporalDateTimeLike.minute?number
    temporalDateTimeLike.month?number
    temporalDateTimeLike.second?number
    temporalDateTimeLike.year?number
    options?Object
    options.overflow?TemporalOverflow

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:42


    withTime

    β–Έ withTime(dateTime, time?): DateTime

    Parameters

    NameType
    dateTimeDateTime
    time?Time

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:57


    withDate

    β–Έ withDate(dateTime, temporalDate): DateTime

    Parameters

    NameType
    dateTimeDateTime
    temporalDateDate

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:58


    add

    β–Έ add(dateTime, temporalDurationLike, options?): DateTime

    Parameters

    NameType
    dateTimeDateTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:59


    subtract

    β–Έ subtract(dateTime, temporalDurationLike, options?): DateTime

    Parameters

    NameType
    dateTimeDateTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:75


    until

    β–Έ until(from, until, options?): Duration

    Parameters

    NameType
    fromDateTime
    untilDateTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IDateTimeFns.ts:91


    since

    β–Έ since(dateTime, other, options?): Duration

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IDateTimeFns.ts:101


    round

    β–Έ round(dateTime, options): DateTime

    Parameters

    NameType
    dateTimeDateTime
    optionsObject
    options.smallestUnit"day" | "hour" | "minute" | "second" | "millisecond" | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:111


    equals

    β–Έ equals(dateTime, other): boolean

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:119


    isEqual

    β–Έ isEqual(dateTime, other): boolean

    alias for equals

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:123


    isBefore

    β–Έ isBefore(dateTime, other): boolean

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:124


    isAfter

    β–Έ isAfter(dateTime, other): boolean

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:125


    isEqualOrBefore

    β–Έ isEqualOrBefore(dateTime, other): boolean

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:126


    isEqualOrAfter

    β–Έ isEqualOrAfter(dateTime, other): boolean

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:127


    toZonedDateTime

    β–Έ toZonedDateTime(dateTime, timeZone, options?): ZonedDateTime

    Parameters

    NameType
    dateTimeDateTime
    timeZonestring
    options?Object
    options.disambiguationTemporalDisambiguation

    Returns

    ZonedDateTime

    Defined in

    types/IDateTimeFns.ts:128


    toDate

    β–Έ toDate(dateTime): Date

    Parameters

    NameType
    dateTimeDateTime

    Returns

    Date

    Defined in

    types/IDateTimeFns.ts:133


    toYearMonth

    β–Έ toYearMonth(dateTime): YearMonth

    Parameters

    NameType
    dateTimeDateTime

    Returns

    YearMonth

    Defined in

    types/IDateTimeFns.ts:134


    toMonthDay

    β–Έ toMonthDay(dateTime): MonthDay

    Parameters

    NameType
    dateTimeDateTime

    Returns

    MonthDay

    Defined in

    types/IDateTimeFns.ts:135


    toTime

    β–Έ toTime(dateTime): Time

    Parameters

    NameType
    dateTimeDateTime

    Returns

    Time

    Defined in

    types/IDateTimeFns.ts:136


    getFields

    β–Έ getFields(dateTime): DateTimeSlots

    Parameters

    NameType
    dateTimeDateTime

    Returns

    DateTimeSlots

    Defined in

    types/IDateTimeFns.ts:137


    from

    β–Έ from(item, options?): DateTime

    Parameters

    NameType
    itemany
    options?Object
    options.overflowTemporalOverflow

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:138


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneDateTime
    twoDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:139


    format

    β–Έ format(dateTime, formatString): string

    summary Format the ZonedDateTime.

    description +To learn more about time zones and DST best practices, visit Time Zones and Resolving Ambiguity.

    Defined in

    iso-types.ts:97

    now

    β–Έ now(timeZone?): DateTime

    This method gets the current calendar date and wall-clock time according to the system settings. Optionally a time zone can be given in which the time is computed, instead of the current system time zone.

    Parameters

    NameTypeDescription
    timeZone?stringThe time zone to get the current date and time in, as a string. If not given, the current system time zone will be used.

    Returns

    DateTime

    an Iso.DateTime string representing the date and time.

    Defined in

    types/IDateTimeFns.ts:17


    fromNumbers

    β–Έ fromNumbers(year, month, day, hour?, minute?, second?, millisecond?): DateTime

    Parameters

    NameType
    yearnumber
    monthnumber
    daynumber
    hour?number
    minute?number
    second?number
    millisecond?number

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:18


    isValid

    β–Έ isValid(dateTime): dateTime is DateTime

    Parameters

    NameType
    dateTimeunknown

    Returns

    dateTime is DateTime

    Defined in

    types/IDateTimeFns.ts:27


    assertIsValid

    β–Έ assertIsValid(dateTime): asserts dateTime is DateTime

    Parameters

    NameType
    dateTimeunknown

    Returns

    asserts dateTime is DateTime

    Defined in

    types/IDateTimeFns.ts:28


    getYear

    β–Έ getYear(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:29


    getMonth

    β–Έ getMonth(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:30


    getDay

    β–Έ getDay(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:31


    getHour

    β–Έ getHour(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:32


    getMinute

    β–Έ getMinute(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:33


    getSecond

    β–Έ getSecond(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:34


    getMillisecond

    β–Έ getMillisecond(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:35


    getDayOfWeek

    β–Έ getDayOfWeek(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:36


    getDayOfYear

    β–Έ getDayOfYear(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:37


    getWeekOfYear

    β–Έ getWeekOfYear(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:38


    getDaysInYear

    β–Έ getDaysInYear(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:39


    getDaysInMonth

    β–Έ getDaysInMonth(dateTime): number

    Parameters

    NameType
    dateTimeDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:40


    getInLeapYear

    β–Έ getInLeapYear(dateTime): boolean

    Parameters

    NameType
    dateTimeDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:41


    with

    β–Έ with(dateTime, temporalDateTimeLike, options?): DateTime

    Parameters

    NameType
    dateTimeDateTime
    temporalDateTimeLikeObject
    temporalDateTimeLike.day?number
    temporalDateTimeLike.hour?number
    temporalDateTimeLike.millisecond?number
    temporalDateTimeLike.minute?number
    temporalDateTimeLike.month?number
    temporalDateTimeLike.second?number
    temporalDateTimeLike.year?number
    options?Object
    options.overflow?TemporalOverflow

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:42


    withTime

    β–Έ withTime(dateTime, time?): DateTime

    Parameters

    NameType
    dateTimeDateTime
    time?Time

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:57


    withDate

    β–Έ withDate(dateTime, temporalDate): DateTime

    Parameters

    NameType
    dateTimeDateTime
    temporalDateDate

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:58


    add

    β–Έ add(dateTime, temporalDurationLike, options?): DateTime

    Parameters

    NameType
    dateTimeDateTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:59


    subtract

    β–Έ subtract(dateTime, temporalDurationLike, options?): DateTime

    Parameters

    NameType
    dateTimeDateTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:75


    until

    β–Έ until(from, until, options?): Duration

    Parameters

    NameType
    fromDateTime
    untilDateTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IDateTimeFns.ts:91


    since

    β–Έ since(dateTime, other, options?): Duration

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IDateTimeFns.ts:101


    round

    β–Έ round(dateTime, options): DateTime

    Parameters

    NameType
    dateTimeDateTime
    optionsObject
    options.smallestUnit"day" | "hour" | "minute" | "second" | "millisecond" | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:111


    equals

    β–Έ equals(dateTime, other): boolean

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:119


    isEqual

    β–Έ isEqual(dateTime, other): boolean

    alias for equals

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:123


    isBefore

    β–Έ isBefore(dateTime, other): boolean

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:124


    isAfter

    β–Έ isAfter(dateTime, other): boolean

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:125


    isEqualOrBefore

    β–Έ isEqualOrBefore(dateTime, other): boolean

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:126


    isEqualOrAfter

    β–Έ isEqualOrAfter(dateTime, other): boolean

    Parameters

    NameType
    dateTimeDateTime
    otherDateTime

    Returns

    boolean

    Defined in

    types/IDateTimeFns.ts:127


    toZonedDateTime

    β–Έ toZonedDateTime(dateTime, timeZone, options?): ZonedDateTime

    Parameters

    NameType
    dateTimeDateTime
    timeZonestring
    options?Object
    options.disambiguationTemporalDisambiguation

    Returns

    ZonedDateTime

    Defined in

    types/IDateTimeFns.ts:128


    toDate

    β–Έ toDate(dateTime): Date

    Parameters

    NameType
    dateTimeDateTime

    Returns

    Date

    Defined in

    types/IDateTimeFns.ts:133


    toYearMonth

    β–Έ toYearMonth(dateTime): YearMonth

    Parameters

    NameType
    dateTimeDateTime

    Returns

    YearMonth

    Defined in

    types/IDateTimeFns.ts:134


    toMonthDay

    β–Έ toMonthDay(dateTime): MonthDay

    Parameters

    NameType
    dateTimeDateTime

    Returns

    MonthDay

    Defined in

    types/IDateTimeFns.ts:135


    toTime

    β–Έ toTime(dateTime): Time

    Parameters

    NameType
    dateTimeDateTime

    Returns

    Time

    Defined in

    types/IDateTimeFns.ts:136


    getFields

    β–Έ getFields(dateTime): DateTimeSlots

    Parameters

    NameType
    dateTimeDateTime

    Returns

    DateTimeSlots

    Defined in

    types/IDateTimeFns.ts:137


    from

    β–Έ from(item, options?): DateTime

    Parameters

    NameType
    itemany
    options?Object
    options.overflowTemporalOverflow

    Returns

    DateTime

    Defined in

    types/IDateTimeFns.ts:138


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneDateTime
    twoDateTime

    Returns

    number

    Defined in

    types/IDateTimeFns.ts:139


    format

    β–Έ format(dateTime, formatString): string

    summary Format the ZonedDateTime.

    description Return the formatted ZonedDateTime string in the given format.

    The characters wrapped between two single quotes characters (') are escaped. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. (see the last example)

    Format of the string is based on Unicode Technical Standard #35: @@ -24,8 +24,8 @@ are marked with "2" in the last column of the table.

    format("2017-11-06", 'MMM') //=> 'Nov'

    format("2017-11-06", 'MMMM') //=> 'November'

    format("2017-11-06", 'MMMMM') //=> 'N'

    format("2017-11-06", 'MMMMMM') //=> 'November'

    format("2017-11-06", 'MMMMMMM') //=> 'November'

  • Some patterns could be unlimited length (such as yyyyyyyy). The output will be padded with zeros to match the length of the pattern.

    format("2017-11-06", 'yyyyyyyy') //=> '00002017'

  • QQQQQ could be not strictly numerical in some locales. These tokens represent the shortest form of the quarter.

  • The main difference between y and u patterns are B.C. years:

    Yearyu
    AC 111
    BC 110
    BC 22-1

    Also yy always returns the last two digits of a year, -while uu pads single digit years to 2 characters and returns other years unchanged:

    Yearyyuu
    10101
    141414
    37676376
    1453531453
  • These patterns are not in the Unicode Technical Standard #35:

    • i: ISO day of week
    • I: ISO week of year
    • o: ordinal number modifier
    • P: long localized date
    • p: long localized time
    • Characters are escaped using single quote symbols (').

    example

    // Represent 11 February 2014 in middle-endian format:
    var result = format("2014-02-11T00:00:00.000", 'MM/dd/yyyy')
    //=> '02/11/2014'

    example

    // Escape string by single quote characters:
    var result = format("2014-02-11T15:00:00.000", "h 'o''clock'")
    //=> "3 o'clock"

    Parameters

    NameTypeDescription
    dateTimeDateTimethe original date
    formatStringstring-

    Returns

    string

    the formatted date string

    Defined in

    types/IDateTimeFns.ts:309


    chain

    β–Έ chain(dateTime): IDateTimeChain

    Parameters

    NameType
    dateTimeDateTime

    Returns

    IDateTimeChain

    Defined in

    types/IDateTimeFns.ts:310

    - +while uu pads single digit years to 2 characters and returns other years unchanged:

    Yearyyuu
    10101
    141414
    37676376
    1453531453
  • These patterns are not in the Unicode Technical Standard #35:

    • i: ISO day of week
    • I: ISO week of year
    • o: ordinal number modifier
    • P: long localized date
    • p: long localized time
    • Characters are escaped using single quote symbols (').

    example

    // Represent 11 February 2014 in middle-endian format:
    var result = format("2014-02-11T00:00:00.000", 'MM/dd/yyyy')
    //=> '02/11/2014'

    example

    // Escape string by single quote characters:
    var result = format("2014-02-11T15:00:00.000", "h 'o''clock'")
    //=> "3 o'clock"

    Parameters

    NameTypeDescription
    dateTimeDateTimethe original date
    formatStringstring-

    Returns

    string

    the formatted date string

    Defined in

    types/IDateTimeFns.ts:309


    chain

    β–Έ chain(dateTime): IDateTimeChain

    Parameters

    NameType
    dateTimeDateTime

    Returns

    IDateTimeChain

    Defined in

    types/IDateTimeFns.ts:310

    + \ No newline at end of file diff --git a/docs/api/Duration/index.html b/docs/api/Duration/index.html index f358342..74819f4 100644 --- a/docs/api/Duration/index.html +++ b/docs/api/Duration/index.html @@ -5,13 +5,13 @@ Duration | iso-fns - +
    -

    Duration

    Ζ¬ Duration: Format["P(n)Y(n)M(n)DT(n)H(n)M(n)S"] & string

    A Iso.Duration represents a duration of time which can be used in date/time arithmetic.

    Iso.Duration can be constructed directly or returned from durationFns.from(). It can also be obtained from the since() function of any other Iso type that supports arithmetic, and is used in those types' add() and subtract() functions.

    An Iso.Duration is a string according to the ISO 8601 notation for durations. The examples in this page use this notation extensively.

    Briefly, the ISO 8601 notation consists of a P character, followed by years, months, weeks, and days, followed by a T character, followed by hours, minutes, and seconds with a decimal part, each with a single-letter suffix that indicates the unit. Any zero components may be omitted. For more detailed information, see the ISO 8601 standard or the Wikipedia page.

    ISO 8601Meaning
    P1Y1M1DT1H1M1.1SOne year, one month, one day, one hour, one minute, one second, and 100 milliseconds
    P40DForty days
    P1Y1DA year and a day
    P3DT4H59MThree days, four hours and 59 minutes
    PT2H30MTwo and a half hours
    P1MOne month
    PT1MOne minute
    PT0.021S21 milliseconds
    PT0SZero
    P0DZero
    note

    According to the ISO 8601-1 standard, weeks are not allowed to appear together with any other units, and durations can only be positive. As extensions to the standard, ISO 8601-2 allows a sign character at the start of the string, and allows combining weeks with other units. If you intend to use a string such as P3W1D, +P1M, or -P1M for interoperability, note that other programs may not accept it.

    Defined in

    iso-types.ts:141

    fromNumbers

    β–Έ fromNumbers(years?, months?, weeks?, days?, hours?, minute?, seconds?, milliseconds?): Duration

    Parameters

    NameType
    years?number
    months?number
    weeks?number
    days?number
    hours?number
    minute?number
    seconds?number
    milliseconds?number

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:5


    isValid

    β–Έ isValid(duration): duration is Duration

    Parameters

    NameType
    durationunknown

    Returns

    duration is Duration

    Defined in

    types/IDurationFns.ts:15


    assertIsValid

    β–Έ assertIsValid(duration): asserts duration is Duration

    Parameters

    NameType
    durationunknown

    Returns

    asserts duration is Duration

    Defined in

    types/IDurationFns.ts:16


    getYears

    β–Έ getYears(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:17


    getMonths

    β–Έ getMonths(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:18


    getWeeks

    β–Έ getWeeks(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:19


    getDays

    β–Έ getDays(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:20


    getHours

    β–Έ getHours(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:21


    getMinutes

    β–Έ getMinutes(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:22


    getSeconds

    β–Έ getSeconds(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:23


    getMilliseconds

    β–Έ getMilliseconds(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:24


    getSign

    β–Έ getSign(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:25


    isBlank

    β–Έ isBlank(duration): boolean

    Parameters

    NameType
    durationDuration

    Returns

    boolean

    Defined in

    types/IDurationFns.ts:26


    with

    β–Έ with(duration, durationLike): Duration

    Parameters

    NameType
    durationDuration
    durationLikeObject
    durationLike.years?number
    durationLike.months?number
    durationLike.weeks?number
    durationLike.days?number
    durationLike.hours?number
    durationLike.minutes?number
    durationLike.seconds?number
    durationLike.milliseconds?number

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:27


    negated

    β–Έ negated(duration): Duration

    Parameters

    NameType
    durationDuration

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:40


    abs

    β–Έ abs(duration): Duration

    Parameters

    NameType
    durationDuration

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:41


    add

    β–Έ add(duration, other, options?): Duration

    Parameters

    NameType
    durationDuration
    otherDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.relativeToDateTime | ZonedDateTime

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:42


    subtract

    β–Έ subtract(duration, other, options?): Duration

    Parameters

    NameType
    durationDuration
    otherDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.relativeToDate | DateTime | ZonedDateTime

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:58


    round

    β–Έ round(duration, options): Duration

    Parameters

    NameType
    durationDuration
    optionsObject
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode
    options.relativeTo?Date | DateTime | ZonedDateTime

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:74


    total

    β–Έ total(duration, options): number

    Parameters

    NameType
    durationDuration
    optionsObject
    options.unitTemporalSingularUnit | TemporalPluralUnit
    options.relativeTo?Date | DateTime | ZonedDateTime

    Returns

    number

    Defined in

    types/IDurationFns.ts:84


    getFields

    β–Έ getFields(duration): DurationSlots

    Parameters

    NameType
    durationDuration

    Returns

    DurationSlots

    Defined in

    types/IDurationFns.ts:91


    from

    β–Έ from(item): Duration

    Parameters

    NameType
    itemany

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:92


    compare

    β–Έ compare(one, two, options?): number

    Parameters

    NameType
    oneDuration
    twoDuration
    options?Object
    options.relativeToDate | DateTime | ZonedDateTime

    Returns

    number

    Defined in

    types/IDurationFns.ts:93


    chain

    β–Έ chain(duration): IDurationChain

    Parameters

    NameType
    durationDuration

    Returns

    IDurationChain

    Defined in

    types/IDurationFns.ts:98

    - +

    Duration

    Ζ¬ Duration: Format["P(n)Y(n)M(n)DT(n)H(n)M(n)S"] & string

    A Iso.Duration represents a duration of time which can be used in date/time arithmetic.

    Iso.Duration can be constructed directly or returned from durationFns.from(). It can also be obtained from the since() function of any other Iso type that supports arithmetic, and is used in those types' add() and subtract() functions.

    An Iso.Duration is a string according to the ISO 8601 notation for durations. The examples in this page use this notation extensively.

    Briefly, the ISO 8601 notation consists of a P character, followed by years, months, weeks, and days, followed by a T character, followed by hours, minutes, and seconds with a decimal part, each with a single-letter suffix that indicates the unit. Any zero components may be omitted. For more detailed information, see the ISO 8601 standard or the Wikipedia page.

    ISO 8601Meaning
    P1Y1M1DT1H1M1.1SOne year, one month, one day, one hour, one minute, one second, and 100 milliseconds
    P40DForty days
    P1Y1DA year and a day
    P3DT4H59MThree days, four hours and 59 minutes
    PT2H30MTwo and a half hours
    P1MOne month
    PT1MOne minute
    PT0.021S21 milliseconds
    PT0SZero
    P0DZero
    note

    According to the ISO 8601-1 standard, weeks are not allowed to appear together with any other units, and durations can only be positive. As extensions to the standard, ISO 8601-2 allows a sign character at the start of the string, and allows combining weeks with other units. If you intend to use a string such as P3W1D, +P1M, or -P1M for interoperability, note that other programs may not accept it.

    Defined in

    iso-types.ts:141

    fromNumbers

    β–Έ fromNumbers(years?, months?, weeks?, days?, hours?, minute?, seconds?, milliseconds?): Duration

    Parameters

    NameType
    years?number
    months?number
    weeks?number
    days?number
    hours?number
    minute?number
    seconds?number
    milliseconds?number

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:5


    isValid

    β–Έ isValid(duration): duration is Duration

    Parameters

    NameType
    durationunknown

    Returns

    duration is Duration

    Defined in

    types/IDurationFns.ts:15


    assertIsValid

    β–Έ assertIsValid(duration): asserts duration is Duration

    Parameters

    NameType
    durationunknown

    Returns

    asserts duration is Duration

    Defined in

    types/IDurationFns.ts:16


    getYears

    β–Έ getYears(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:17


    getMonths

    β–Έ getMonths(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:18


    getWeeks

    β–Έ getWeeks(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:19


    getDays

    β–Έ getDays(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:20


    getHours

    β–Έ getHours(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:21


    getMinutes

    β–Έ getMinutes(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:22


    getSeconds

    β–Έ getSeconds(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:23


    getMilliseconds

    β–Έ getMilliseconds(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:24


    getSign

    β–Έ getSign(duration): number

    Parameters

    NameType
    durationDuration

    Returns

    number

    Defined in

    types/IDurationFns.ts:25


    isBlank

    β–Έ isBlank(duration): boolean

    Parameters

    NameType
    durationDuration

    Returns

    boolean

    Defined in

    types/IDurationFns.ts:26


    with

    β–Έ with(duration, durationLike): Duration

    Parameters

    NameType
    durationDuration
    durationLikeObject
    durationLike.years?number
    durationLike.months?number
    durationLike.weeks?number
    durationLike.days?number
    durationLike.hours?number
    durationLike.minutes?number
    durationLike.seconds?number
    durationLike.milliseconds?number

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:27


    negated

    β–Έ negated(duration): Duration

    Parameters

    NameType
    durationDuration

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:40


    abs

    β–Έ abs(duration): Duration

    Parameters

    NameType
    durationDuration

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:41


    add

    β–Έ add(duration, other, options?): Duration

    Parameters

    NameType
    durationDuration
    otherDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.relativeToDateTime | ZonedDateTime

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:42


    subtract

    β–Έ subtract(duration, other, options?): Duration

    Parameters

    NameType
    durationDuration
    otherDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.relativeToDate | DateTime | ZonedDateTime

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:58


    round

    β–Έ round(duration, options): Duration

    Parameters

    NameType
    durationDuration
    optionsObject
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode
    options.relativeTo?Date | DateTime | ZonedDateTime

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:74


    total

    β–Έ total(duration, options): number

    Parameters

    NameType
    durationDuration
    optionsObject
    options.unitTemporalSingularUnit | TemporalPluralUnit
    options.relativeTo?Date | DateTime | ZonedDateTime

    Returns

    number

    Defined in

    types/IDurationFns.ts:84


    getFields

    β–Έ getFields(duration): DurationSlots

    Parameters

    NameType
    durationDuration

    Returns

    DurationSlots

    Defined in

    types/IDurationFns.ts:91


    from

    β–Έ from(item): Duration

    Parameters

    NameType
    itemany

    Returns

    Duration

    Defined in

    types/IDurationFns.ts:92


    compare

    β–Έ compare(one, two, options?): number

    Parameters

    NameType
    oneDuration
    twoDuration
    options?Object
    options.relativeToDate | DateTime | ZonedDateTime

    Returns

    number

    Defined in

    types/IDurationFns.ts:93


    chain

    β–Έ chain(duration): IDurationChain

    Parameters

    NameType
    durationDuration

    Returns

    IDurationChain

    Defined in

    types/IDurationFns.ts:98

    + \ No newline at end of file diff --git a/docs/api/Instant/index.html b/docs/api/Instant/index.html index 10d95f9..9c5bc0d 100644 --- a/docs/api/Instant/index.html +++ b/docs/api/Instant/index.html @@ -5,13 +5,13 @@ Instant | iso-fns - +
    -

    Instant

    Ζ¬ Instant: Format["YYYY-MM-DDThh:mm-ss[.sss]Z"] & string

    An Iso.Instant is a single point in time (called "exact time"), with a precision in milliseconds. No time zone is present. As such Iso.Instant has no concept of days, months or even hours.

    For convenience of interoperability, instants are represented as an ISO8601 string in Zulu time (UTC). The format looks like 1970-01-01T00:00:00.000Z.

    If you have a legacy Date instance, you can use its toISOString() method to convert to an Iso.Instant.

    Since Iso.Instant doesn't contain any information about time zones, a Iso.TimeZone is needed in order to convert it into a Iso.DateTime (and from there into any of the other Iso types.)

    Like Unix time, Instant ignores leap seconds.

    Defined in

    iso-types.ts:39

    now

    β–Έ now(): Instant

    This method gets the current exact system time, without regard to time zone. This is a good way to get a timestamp for an event, for example. It works like the old-style JavaScript Date.now().

    Returns

    Instant

    an Iso.Instant string representing the current system time.

    Defined in

    types/IInstantFns.ts:13


    fromEpochMilliseconds

    β–Έ fromEpochMilliseconds(epochMilliseconds): Instant

    Parameters

    NameType
    epochMillisecondsnumber

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:14


    isValid

    β–Έ isValid(instant): instant is Instant

    Parameters

    NameType
    instantunknown

    Returns

    instant is Instant

    Defined in

    types/IInstantFns.ts:15


    assertIsValid

    β–Έ assertIsValid(instant): asserts instant is Instant

    Parameters

    NameType
    instantunknown

    Returns

    asserts instant is Instant

    Defined in

    types/IInstantFns.ts:16


    getEpochSeconds

    β–Έ getEpochSeconds(instant): number

    Parameters

    NameType
    instantInstant

    Returns

    number

    Defined in

    types/IInstantFns.ts:17


    getEpochMilliseconds

    β–Έ getEpochMilliseconds(instant): number

    Parameters

    NameType
    instantInstant

    Returns

    number

    Defined in

    types/IInstantFns.ts:18


    add

    β–Έ add(instant, temporalDurationLike): Instant

    Here is a comment!

    Parameters

    NameType
    instantInstant
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:24


    subtract

    β–Έ subtract(instant, temporalDurationLike): Instant

    Parameters

    NameType
    instantInstant
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:39


    until

    β–Έ until(from, until, options?): Duration

    Parameters

    NameType
    fromInstant
    untilInstant
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IInstantFns.ts:54


    since

    β–Έ since(to, since, options?): Duration

    Parameters

    NameType
    toInstant
    sinceInstant
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IInstantFns.ts:64


    round

    β–Έ round(instant, options): Instant

    Parameters

    NameType
    instantInstant
    optionsObject
    options.smallestUnit?TemporalSingularUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:74


    equals

    β–Έ equals(instant, other): boolean

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:82


    isEqual

    β–Έ isEqual(instant, other): boolean

    alias for equals

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:86


    isBefore

    β–Έ isBefore(instant, other): boolean

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:87


    isAfter

    β–Έ isAfter(instant, other): boolean

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:88


    isEqualOrBefore

    β–Έ isEqualOrBefore(instant, other): boolean

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:89


    isEqualOrAfter

    β–Έ isEqualOrAfter(instant, other): boolean

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:90


    toZonedDateTime

    β–Έ toZonedDateTime(instant, timeZone): ZonedDateTime

    Parameters

    NameType
    instantInstant
    timeZonestring

    Returns

    ZonedDateTime

    Defined in

    types/IInstantFns.ts:91


    formatISO9075

    β–Έ formatISO9075(instant): string

    Parameters

    NameType
    instantInstant

    Returns

    string

    Defined in

    types/IInstantFns.ts:92


    toJsDate

    β–Έ toJsDate(instant): Date

    Parameters

    NameType
    instantInstant

    Returns

    Date

    Defined in

    types/IInstantFns.ts:93


    fromEpochSeconds

    β–Έ fromEpochSeconds(epochSeconds): Instant

    Parameters

    NameType
    epochSecondsnumber

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:94


    from

    β–Έ from(item): Instant

    Parameters

    NameType
    itemany

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:95


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneInstant
    twoInstant

    Returns

    number

    Defined in

    types/IInstantFns.ts:96


    chain

    β–Έ chain(instant): IInstantChain

    Parameters

    NameType
    instantInstant

    Returns

    IInstantChain

    Defined in

    types/IInstantFns.ts:97

    - +

    Instant

    Ζ¬ Instant: Format["YYYY-MM-DDThh:mm-ss[.sss]Z"] & string

    An Iso.Instant is a single point in time (called "exact time"), with a precision in milliseconds. No time zone is present. As such Iso.Instant has no concept of days, months or even hours.

    For convenience of interoperability, instants are represented as an ISO8601 string in Zulu time (UTC). The format looks like 1970-01-01T00:00:00.000Z.

    If you have a legacy Date instance, you can use its toISOString() method to convert to an Iso.Instant.

    Since Iso.Instant doesn't contain any information about time zones, a Iso.TimeZone is needed in order to convert it into a Iso.DateTime (and from there into any of the other Iso types.)

    Like Unix time, Instant ignores leap seconds.

    Defined in

    iso-types.ts:39

    now

    β–Έ now(): Instant

    This method gets the current exact system time, without regard to time zone. This is a good way to get a timestamp for an event, for example. It works like the old-style JavaScript Date.now().

    Returns

    Instant

    an Iso.Instant string representing the current system time.

    Defined in

    types/IInstantFns.ts:13


    fromEpochMilliseconds

    β–Έ fromEpochMilliseconds(epochMilliseconds): Instant

    Parameters

    NameType
    epochMillisecondsnumber

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:14


    isValid

    β–Έ isValid(instant): instant is Instant

    Parameters

    NameType
    instantunknown

    Returns

    instant is Instant

    Defined in

    types/IInstantFns.ts:15


    assertIsValid

    β–Έ assertIsValid(instant): asserts instant is Instant

    Parameters

    NameType
    instantunknown

    Returns

    asserts instant is Instant

    Defined in

    types/IInstantFns.ts:16


    getEpochSeconds

    β–Έ getEpochSeconds(instant): number

    Parameters

    NameType
    instantInstant

    Returns

    number

    Defined in

    types/IInstantFns.ts:17


    getEpochMilliseconds

    β–Έ getEpochMilliseconds(instant): number

    Parameters

    NameType
    instantInstant

    Returns

    number

    Defined in

    types/IInstantFns.ts:18


    add

    β–Έ add(instant, temporalDurationLike): Instant

    Here is a comment!

    Parameters

    NameType
    instantInstant
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:24


    subtract

    β–Έ subtract(instant, temporalDurationLike): Instant

    Parameters

    NameType
    instantInstant
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:39


    until

    β–Έ until(from, until, options?): Duration

    Parameters

    NameType
    fromInstant
    untilInstant
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IInstantFns.ts:54


    since

    β–Έ since(to, since, options?): Duration

    Parameters

    NameType
    toInstant
    sinceInstant
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IInstantFns.ts:64


    round

    β–Έ round(instant, options): Instant

    Parameters

    NameType
    instantInstant
    optionsObject
    options.smallestUnit?TemporalSingularUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:74


    equals

    β–Έ equals(instant, other): boolean

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:82


    isEqual

    β–Έ isEqual(instant, other): boolean

    alias for equals

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:86


    isBefore

    β–Έ isBefore(instant, other): boolean

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:87


    isAfter

    β–Έ isAfter(instant, other): boolean

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:88


    isEqualOrBefore

    β–Έ isEqualOrBefore(instant, other): boolean

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:89


    isEqualOrAfter

    β–Έ isEqualOrAfter(instant, other): boolean

    Parameters

    NameType
    instantInstant
    otherInstant

    Returns

    boolean

    Defined in

    types/IInstantFns.ts:90


    toZonedDateTime

    β–Έ toZonedDateTime(instant, timeZone): ZonedDateTime

    Parameters

    NameType
    instantInstant
    timeZonestring

    Returns

    ZonedDateTime

    Defined in

    types/IInstantFns.ts:91


    formatISO9075

    β–Έ formatISO9075(instant): string

    Parameters

    NameType
    instantInstant

    Returns

    string

    Defined in

    types/IInstantFns.ts:92


    toJsDate

    β–Έ toJsDate(instant): Date

    Parameters

    NameType
    instantInstant

    Returns

    Date

    Defined in

    types/IInstantFns.ts:93


    fromEpochSeconds

    β–Έ fromEpochSeconds(epochSeconds): Instant

    Parameters

    NameType
    epochSecondsnumber

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:94


    from

    β–Έ from(item): Instant

    Parameters

    NameType
    itemany

    Returns

    Instant

    Defined in

    types/IInstantFns.ts:95


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneInstant
    twoInstant

    Returns

    number

    Defined in

    types/IInstantFns.ts:96


    chain

    β–Έ chain(instant): IInstantChain

    Parameters

    NameType
    instantInstant

    Returns

    IInstantChain

    Defined in

    types/IInstantFns.ts:97

    + \ No newline at end of file diff --git a/docs/api/MonthDay/index.html b/docs/api/MonthDay/index.html index e922294..5698e59 100644 --- a/docs/api/MonthDay/index.html +++ b/docs/api/MonthDay/index.html @@ -5,12 +5,12 @@ MonthDay | iso-fns - +
    -

    MonthDay

    Ζ¬ MonthDay: Format["--MM-DD"] & string

    A Iso.MonthDay represents a particular day on the calendar, but without a year. For example, it could be used to represent a yearly recurring event, like "Bastille Day is on the 14th of July."

    If you need to refer to a certain instance of a calendar event, in a particular year, use Iso.Date or even Iso.DateTime. A Iso.MonthDay can be converted into a Iso.Date by combining it with a year, using the toDate() method.

    Defined in

    iso-types.ts:111

    fromNumbers

    β–Έ fromNumbers(month, day): MonthDay

    Parameters

    NameType
    monthnumber
    daynumber

    Returns

    MonthDay

    Defined in

    types/IMonthDayFns.ts:6


    isValid

    β–Έ isValid(monthDay): monthDay is MonthDay

    Parameters

    NameType
    monthDayunknown

    Returns

    monthDay is MonthDay

    Defined in

    types/IMonthDayFns.ts:7


    assertIsValid

    β–Έ assertIsValid(monthDay): asserts monthDay is MonthDay

    Parameters

    NameType
    monthDayunknown

    Returns

    asserts monthDay is MonthDay

    Defined in

    types/IMonthDayFns.ts:8


    getDay

    β–Έ getDay(monthDay): number

    Parameters

    NameType
    monthDayMonthDay

    Returns

    number

    Defined in

    types/IMonthDayFns.ts:9


    getMonth

    β–Έ getMonth(monthDay): number

    Parameters

    NameType
    monthDayMonthDay

    Returns

    number

    Defined in

    types/IMonthDayFns.ts:10


    with

    β–Έ with(monthDay, monthDayLike, options?): MonthDay

    Parameters

    NameType
    monthDayMonthDay
    monthDayLikeObject
    monthDayLike.monthnumber
    monthDayLike.daynumber
    options?Object
    options.overflowTemporalOverflow

    Returns

    MonthDay

    Defined in

    types/IMonthDayFns.ts:11


    equals

    β–Έ equals(monthDay, other): boolean

    Parameters

    NameType
    monthDayMonthDay
    otherMonthDay

    Returns

    boolean

    Defined in

    types/IMonthDayFns.ts:19


    toDate

    β–Έ toDate(monthDay, year): Date

    Parameters

    NameType
    monthDayMonthDay
    yearnumber

    Returns

    Date

    Defined in

    types/IMonthDayFns.ts:20


    getFields

    β–Έ getFields(monthDay): Object

    Parameters

    NameType
    monthDayMonthDay

    Returns

    Object

    NameType
    monthnumber
    daynumber

    Defined in

    types/IMonthDayFns.ts:21


    from

    β–Έ from(item, options?): MonthDay

    Parameters

    NameType
    itemany
    options?Object
    options.overflowTemporalOverflow

    Returns

    MonthDay

    Defined in

    types/IMonthDayFns.ts:25


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneMonthDay
    twoMonthDay

    Returns

    number

    Defined in

    types/IMonthDayFns.ts:26


    format

    β–Έ format(monthDay, format): string

    summary Format the ZonedDateTime.

    description +

    MonthDay

    Ζ¬ MonthDay: Format["--MM-DD"] & string

    A Iso.MonthDay represents a particular day on the calendar, but without a year. For example, it could be used to represent a yearly recurring event, like "Bastille Day is on the 14th of July."

    If you need to refer to a certain instance of a calendar event, in a particular year, use Iso.Date or even Iso.DateTime. A Iso.MonthDay can be converted into a Iso.Date by combining it with a year, using the toDate() method.

    Defined in

    iso-types.ts:111

    fromNumbers

    β–Έ fromNumbers(month, day): MonthDay

    Parameters

    NameType
    monthnumber
    daynumber

    Returns

    MonthDay

    Defined in

    types/IMonthDayFns.ts:6


    isValid

    β–Έ isValid(monthDay): monthDay is MonthDay

    Parameters

    NameType
    monthDayunknown

    Returns

    monthDay is MonthDay

    Defined in

    types/IMonthDayFns.ts:7


    assertIsValid

    β–Έ assertIsValid(monthDay): asserts monthDay is MonthDay

    Parameters

    NameType
    monthDayunknown

    Returns

    asserts monthDay is MonthDay

    Defined in

    types/IMonthDayFns.ts:8


    getDay

    β–Έ getDay(monthDay): number

    Parameters

    NameType
    monthDayMonthDay

    Returns

    number

    Defined in

    types/IMonthDayFns.ts:9


    getMonth

    β–Έ getMonth(monthDay): number

    Parameters

    NameType
    monthDayMonthDay

    Returns

    number

    Defined in

    types/IMonthDayFns.ts:10


    with

    β–Έ with(monthDay, monthDayLike, options?): MonthDay

    Parameters

    NameType
    monthDayMonthDay
    monthDayLikeObject
    monthDayLike.monthnumber
    monthDayLike.daynumber
    options?Object
    options.overflowTemporalOverflow

    Returns

    MonthDay

    Defined in

    types/IMonthDayFns.ts:11


    equals

    β–Έ equals(monthDay, other): boolean

    Parameters

    NameType
    monthDayMonthDay
    otherMonthDay

    Returns

    boolean

    Defined in

    types/IMonthDayFns.ts:19


    toDate

    β–Έ toDate(monthDay, year): Date

    Parameters

    NameType
    monthDayMonthDay
    yearnumber

    Returns

    Date

    Defined in

    types/IMonthDayFns.ts:20


    getFields

    β–Έ getFields(monthDay): Object

    Parameters

    NameType
    monthDayMonthDay

    Returns

    Object

    NameType
    monthnumber
    daynumber

    Defined in

    types/IMonthDayFns.ts:21


    from

    β–Έ from(item, options?): MonthDay

    Parameters

    NameType
    itemany
    options?Object
    options.overflowTemporalOverflow

    Returns

    MonthDay

    Defined in

    types/IMonthDayFns.ts:25


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneMonthDay
    twoMonthDay

    Returns

    number

    Defined in

    types/IMonthDayFns.ts:26


    format

    β–Έ format(monthDay, format): string

    summary Format the ZonedDateTime.

    description Return the formatted ZonedDateTime string in the given format.

    The characters wrapped between two single quotes characters (') are escaped. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. (see the last example)

    Format of the string is based on Unicode Technical Standard #35: @@ -21,8 +21,8 @@ the output will be the same as default pattern for this unit, usually the longest one (in case of ISO weekdays, EEEE). Default patterns for units are marked with "2" in the last column of the table.

    format("2017-11-06", 'MMM') //=> 'Nov'

    format("2017-11-06", 'MMMM') //=> 'November'

    format("2017-11-06", 'MMMMM') //=> 'N'

    format("2017-11-06", 'MMMMMM') //=> 'November'

    format("2017-11-06", 'MMMMMMM') //=> 'November'

  • QQQQQ could be not strictly numerical in some locales. -These tokens represent the shortest form of the quarter.

  • These patterns are not in the Unicode Technical Standard #35:

    • o: ordinal number modifier
    • Characters are escaped using single quote symbols (').

    example

    // Represent 11 February 2014 in middle-endian format:
    var result = format("--02-11", 'MM/dd')
    //=> '02/11'

    Parameters

    NameTypeDescription
    monthDayMonthDaythe original date
    formatstringthe string of tokens

    Returns

    string

    the formatted date string

    Defined in

    types/IMonthDayFns.ts:98


    chain

    β–Έ chain(monthDay): IMonthDayChain

    Parameters

    NameType
    monthDayMonthDay

    Returns

    IMonthDayChain

    Defined in

    types/IMonthDayFns.ts:99

    - +These tokens represent the shortest form of the quarter.

  • These patterns are not in the Unicode Technical Standard #35:

    • o: ordinal number modifier
    • Characters are escaped using single quote symbols (').

    example

    // Represent 11 February 2014 in middle-endian format:
    var result = format("--02-11", 'MM/dd')
    //=> '02/11'

    Parameters

    NameTypeDescription
    monthDayMonthDaythe original date
    formatstringthe string of tokens

    Returns

    string

    the formatted date string

    Defined in

    types/IMonthDayFns.ts:98


    chain

    β–Έ chain(monthDay): IMonthDayChain

    Parameters

    NameType
    monthDayMonthDay

    Returns

    IMonthDayChain

    Defined in

    types/IMonthDayFns.ts:99

    + \ No newline at end of file diff --git a/docs/api/Time/index.html b/docs/api/Time/index.html index a36e107..c1af416 100644 --- a/docs/api/Time/index.html +++ b/docs/api/Time/index.html @@ -5,12 +5,12 @@ Time | iso-fns - +
    -

    Time

    Ζ¬ Time: Format["hh:mm:ss[.sss]"] & string

    An Iso.Time represents a wall-clock time, with a precision in milliseconds, and without any time zone. "Wall-clock time" refers to the concept of a time as expressed in everyday usage β€” the time that you read off the clock on the wall. For example, it could be used to represent an event that happens daily at a certain time, no matter what time zone.

    Iso.Time refers to a time with no associated calendar date; if you need to refer to a specific time on a specific day, use Iso.DateTime. A Iso.Time can be converted into a Iso.ZonedDateTime by combining it with a Iso.Date and Iso.TimeZone using the toZonedDateTime() function. It can also be combined with a Iso.Date to yield a "zoneless" Iso.DateTime using the toDateTime() function.

    Defined in

    iso-types.ts:73

    now

    β–Έ now(timeZone?): Time

    This method gets the current wall-clock time according to the system settings. Optionally a time zone can be given in which the time is computed, instead of the current system time zone.

    Parameters

    NameTypeDescription
    timeZone?stringThe time zone to get the current date and time in as a string. If not given, the current system time zone will be used.

    Returns

    Time

    an Iso.Time string representing the current system time.

    Defined in

    types/ITimeFns.ts:14


    fromNumbers

    β–Έ fromNumbers(hour?, minute?, second?, millisecond?): Time

    Parameters

    NameType
    hour?number
    minute?number
    second?number
    millisecond?number

    Returns

    Time

    Defined in

    types/ITimeFns.ts:15


    isValid

    β–Έ isValid(time): time is Time

    Parameters

    NameType
    timeunknown

    Returns

    time is Time

    Defined in

    types/ITimeFns.ts:16


    assertIsValid

    β–Έ assertIsValid(time): asserts time is Time

    Parameters

    NameType
    timeunknown

    Returns

    asserts time is Time

    Defined in

    types/ITimeFns.ts:17


    getHour

    β–Έ getHour(time): number

    Parameters

    NameType
    timeTime

    Returns

    number

    Defined in

    types/ITimeFns.ts:18


    getMinute

    β–Έ getMinute(time): number

    Parameters

    NameType
    timeTime

    Returns

    number

    Defined in

    types/ITimeFns.ts:19


    getSecond

    β–Έ getSecond(time): number

    Parameters

    NameType
    timeTime

    Returns

    number

    Defined in

    types/ITimeFns.ts:20


    getMillisecond

    β–Έ getMillisecond(time): number

    Parameters

    NameType
    timeTime

    Returns

    number

    Defined in

    types/ITimeFns.ts:21


    with

    β–Έ with(time, timeLike, options?): Time

    Parameters

    NameType
    timeTime
    timeLikeObject
    timeLike.hour?number
    timeLike.minute?number
    timeLike.second?number
    timeLike.millisecond?number
    options?Object
    options.overflowTemporalOverflow

    Returns

    Time

    Defined in

    types/ITimeFns.ts:22


    add

    β–Έ add(time, temporalDurationLike, options?): Time

    Parameters

    NameType
    timeTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    Time

    Defined in

    types/ITimeFns.ts:34


    subtract

    β–Έ subtract(time, temporalDurationLike, options?): Time

    Parameters

    NameType
    timeTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    Time

    Defined in

    types/ITimeFns.ts:50


    until

    β–Έ until(time, other, options?): Duration

    Parameters

    NameType
    timeTime
    otherTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/ITimeFns.ts:66


    since

    β–Έ since(time, other, options?): Duration

    Parameters

    NameType
    timeTime
    otherTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/ITimeFns.ts:76


    round

    β–Έ round(time, options): Time

    Parameters

    NameType
    timeTime
    optionsObject
    options.smallestUnit"day" | "hour" | "minute" | "second" | "millisecond"
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Time

    Defined in

    types/ITimeFns.ts:86


    equals

    β–Έ equals(time, other): boolean

    Parameters

    NameType
    timeTime
    otherTime

    Returns

    boolean

    Defined in

    types/ITimeFns.ts:94


    toDateTime

    β–Έ toDateTime(time, date): DateTime

    Parameters

    NameType
    timeTime
    dateDate

    Returns

    DateTime

    Defined in

    types/ITimeFns.ts:95


    toZonedDateTime

    β–Έ toZonedDateTime(time, item): ZonedDateTime

    Parameters

    NameType
    timeTime
    itemObject
    item.dateDate
    item.timeZonestring

    Returns

    ZonedDateTime

    Defined in

    types/ITimeFns.ts:96


    getFields

    β–Έ getFields(time): TimeSlots

    Parameters

    NameType
    timeTime

    Returns

    TimeSlots

    Defined in

    types/ITimeFns.ts:103


    from

    β–Έ from(item, options?): Time

    Parameters

    NameType
    itemany
    options?Object
    options.overflowTemporalOverflow

    Returns

    Time

    Defined in

    types/ITimeFns.ts:104


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneTime
    twoTime

    Returns

    number

    Defined in

    types/ITimeFns.ts:105


    format

    β–Έ format(time, format): string

    summary Format the ZonedDateTime.

    description +

    Time

    Ζ¬ Time: Format["hh:mm:ss[.sss]"] & string

    An Iso.Time represents a wall-clock time, with a precision in milliseconds, and without any time zone. "Wall-clock time" refers to the concept of a time as expressed in everyday usage β€” the time that you read off the clock on the wall. For example, it could be used to represent an event that happens daily at a certain time, no matter what time zone.

    Iso.Time refers to a time with no associated calendar date; if you need to refer to a specific time on a specific day, use Iso.DateTime. A Iso.Time can be converted into a Iso.ZonedDateTime by combining it with a Iso.Date and Iso.TimeZone using the toZonedDateTime() function. It can also be combined with a Iso.Date to yield a "zoneless" Iso.DateTime using the toDateTime() function.

    Defined in

    iso-types.ts:73

    now

    β–Έ now(timeZone?): Time

    This method gets the current wall-clock time according to the system settings. Optionally a time zone can be given in which the time is computed, instead of the current system time zone.

    Parameters

    NameTypeDescription
    timeZone?stringThe time zone to get the current date and time in as a string. If not given, the current system time zone will be used.

    Returns

    Time

    an Iso.Time string representing the current system time.

    Defined in

    types/ITimeFns.ts:14


    fromNumbers

    β–Έ fromNumbers(hour?, minute?, second?, millisecond?): Time

    Parameters

    NameType
    hour?number
    minute?number
    second?number
    millisecond?number

    Returns

    Time

    Defined in

    types/ITimeFns.ts:15


    isValid

    β–Έ isValid(time): time is Time

    Parameters

    NameType
    timeunknown

    Returns

    time is Time

    Defined in

    types/ITimeFns.ts:16


    assertIsValid

    β–Έ assertIsValid(time): asserts time is Time

    Parameters

    NameType
    timeunknown

    Returns

    asserts time is Time

    Defined in

    types/ITimeFns.ts:17


    getHour

    β–Έ getHour(time): number

    Parameters

    NameType
    timeTime

    Returns

    number

    Defined in

    types/ITimeFns.ts:18


    getMinute

    β–Έ getMinute(time): number

    Parameters

    NameType
    timeTime

    Returns

    number

    Defined in

    types/ITimeFns.ts:19


    getSecond

    β–Έ getSecond(time): number

    Parameters

    NameType
    timeTime

    Returns

    number

    Defined in

    types/ITimeFns.ts:20


    getMillisecond

    β–Έ getMillisecond(time): number

    Parameters

    NameType
    timeTime

    Returns

    number

    Defined in

    types/ITimeFns.ts:21


    with

    β–Έ with(time, timeLike, options?): Time

    Parameters

    NameType
    timeTime
    timeLikeObject
    timeLike.hour?number
    timeLike.minute?number
    timeLike.second?number
    timeLike.millisecond?number
    options?Object
    options.overflowTemporalOverflow

    Returns

    Time

    Defined in

    types/ITimeFns.ts:22


    add

    β–Έ add(time, temporalDurationLike, options?): Time

    Parameters

    NameType
    timeTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    Time

    Defined in

    types/ITimeFns.ts:34


    subtract

    β–Έ subtract(time, temporalDurationLike, options?): Time

    Parameters

    NameType
    timeTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    Time

    Defined in

    types/ITimeFns.ts:50


    until

    β–Έ until(time, other, options?): Duration

    Parameters

    NameType
    timeTime
    otherTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/ITimeFns.ts:66


    since

    β–Έ since(time, other, options?): Duration

    Parameters

    NameType
    timeTime
    otherTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/ITimeFns.ts:76


    round

    β–Έ round(time, options): Time

    Parameters

    NameType
    timeTime
    optionsObject
    options.smallestUnit"day" | "hour" | "minute" | "second" | "millisecond"
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Time

    Defined in

    types/ITimeFns.ts:86


    equals

    β–Έ equals(time, other): boolean

    Parameters

    NameType
    timeTime
    otherTime

    Returns

    boolean

    Defined in

    types/ITimeFns.ts:94


    toDateTime

    β–Έ toDateTime(time, date): DateTime

    Parameters

    NameType
    timeTime
    dateDate

    Returns

    DateTime

    Defined in

    types/ITimeFns.ts:95


    toZonedDateTime

    β–Έ toZonedDateTime(time, item): ZonedDateTime

    Parameters

    NameType
    timeTime
    itemObject
    item.dateDate
    item.timeZonestring

    Returns

    ZonedDateTime

    Defined in

    types/ITimeFns.ts:96


    getFields

    β–Έ getFields(time): TimeSlots

    Parameters

    NameType
    timeTime

    Returns

    TimeSlots

    Defined in

    types/ITimeFns.ts:103


    from

    β–Έ from(item, options?): Time

    Parameters

    NameType
    itemany
    options?Object
    options.overflowTemporalOverflow

    Returns

    Time

    Defined in

    types/ITimeFns.ts:104


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneTime
    twoTime

    Returns

    number

    Defined in

    types/ITimeFns.ts:105


    format

    β–Έ format(time, format): string

    summary Format the ZonedDateTime.

    description Return the formatted ZonedDateTime string in the given format.

    The characters wrapped between two single quotes characters (') are escaped. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. (see the last example)

    Format of the string is based on Unicode Technical Standard #35: @@ -21,8 +21,8 @@ the output will be the same as default pattern for this unit, usually the longest one (in case of ISO weekdays, EEEE). Default patterns for units are marked with "2" in the last column of the table.

    format("2017-11-06", 'MMM') //=> 'Nov'

    format("2017-11-06", 'MMMM') //=> 'November'

    format("2017-11-06", 'MMMMM') //=> 'N'

    format("2017-11-06", 'MMMMMM') //=> 'November'

    format("2017-11-06", 'MMMMMMM') //=> 'November'

  • Some patterns could be unlimited length (such as yyyyyyyy). -The output will be padded with zeros to match the length of the pattern.

    format("2017-11-06", 'yyyyyyyy') //=> '00002017'

  • These patterns are not in the Unicode Technical Standard #35:

    • o: ordinal number modifier
    • p: long localized time
    • Characters are escaped using single quote symbols (').

    example

    // Escape string by single quote characters:
    var result = format("15:00:00.000", "h 'o''clock'")
    //=> "3 o'clock"

    Parameters

    NameTypeDescription
    timeTimethe original date
    formatstringthe string of tokens

    Returns

    string

    the formatted date string

    Defined in

    types/ITimeFns.ts:199


    chain

    β–Έ chain(time): ITimeChain

    Parameters

    NameType
    timeTime

    Returns

    ITimeChain

    Defined in

    types/ITimeFns.ts:200

    - +The output will be padded with zeros to match the length of the pattern.

    format("2017-11-06", 'yyyyyyyy') //=> '00002017'

  • These patterns are not in the Unicode Technical Standard #35:

    • o: ordinal number modifier
    • p: long localized time
    • Characters are escaped using single quote symbols (').

    example

    // Escape string by single quote characters:
    var result = format("15:00:00.000", "h 'o''clock'")
    //=> "3 o'clock"

    Parameters

    NameTypeDescription
    timeTimethe original date
    formatstringthe string of tokens

    Returns

    string

    the formatted date string

    Defined in

    types/ITimeFns.ts:199


    chain

    β–Έ chain(time): ITimeChain

    Parameters

    NameType
    timeTime

    Returns

    ITimeChain

    Defined in

    types/ITimeFns.ts:200

    + \ No newline at end of file diff --git a/docs/api/YearMonth/index.html b/docs/api/YearMonth/index.html index 498abb9..f892b3c 100644 --- a/docs/api/YearMonth/index.html +++ b/docs/api/YearMonth/index.html @@ -5,12 +5,12 @@ YearMonth | iso-fns - +
    -

    YearMonth

    Ζ¬ YearMonth: Format["YYYY-MM"] & string

    A Iso.YearMonth represents a particular month on the calendar. For example, it could be used to represent a particular instance of a monthly recurring event, like "the June 2019 meeting".

    Iso.YearMonth refers to the whole of a specific month; if you need to refer to a calendar event on a certain day, use Iso.Date or even Iso.DateTime. A Iso.YearMonth can be converted into a Iso.Date by combining it with a day of the month, using the toDate() function.

    Defined in

    iso-types.ts:104

    fromNumbers

    β–Έ fromNumbers(year, month): YearMonth

    Parameters

    NameType
    yearnumber
    monthnumber

    Returns

    YearMonth

    Defined in

    types/IYearMonthFns.ts:7


    isValid

    β–Έ isValid(yearMonth): yearMonth is YearMonth

    Parameters

    NameType
    yearMonthunknown

    Returns

    yearMonth is YearMonth

    Defined in

    types/IYearMonthFns.ts:8


    assertIsValid

    β–Έ assertIsValid(yearMonth): asserts yearMonth is YearMonth

    Parameters

    NameType
    yearMonthunknown

    Returns

    asserts yearMonth is YearMonth

    Defined in

    types/IYearMonthFns.ts:9


    getYear

    β–Έ getYear(yearMonth): number

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    number

    Defined in

    types/IYearMonthFns.ts:10


    getMonth

    β–Έ getMonth(yearMonth): number

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    number

    Defined in

    types/IYearMonthFns.ts:11


    getDaysInMonth

    β–Έ getDaysInMonth(yearMonth): number

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    number

    Defined in

    types/IYearMonthFns.ts:12


    getDaysInYear

    β–Έ getDaysInYear(yearMonth): number

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    number

    Defined in

    types/IYearMonthFns.ts:13


    inLeapYear

    β–Έ inLeapYear(yearMonth): boolean

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:14


    with

    β–Έ with(yearMonth, yearMonthLike, options?): YearMonth

    Parameters

    NameType
    yearMonthYearMonth
    yearMonthLikeObject
    yearMonthLike.year?number
    yearMonthLike.month?number
    options?Object
    options.overflowTemporalOverflow

    Returns

    YearMonth

    Defined in

    types/IYearMonthFns.ts:15


    add

    β–Έ add(yearMonth, temporalDurationLike, options?): YearMonth

    Parameters

    NameType
    yearMonthYearMonth
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    YearMonth

    Defined in

    types/IYearMonthFns.ts:20


    subtract

    β–Έ subtract(yearMonth, temporalDurationLike, options?): YearMonth

    Parameters

    NameType
    yearMonthYearMonth
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    YearMonth

    Defined in

    types/IYearMonthFns.ts:36


    until

    β–Έ until(yearMonth, other, options?): Duration

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IYearMonthFns.ts:52


    since

    β–Έ since(yearMonth, other, options?): Duration

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IYearMonthFns.ts:62


    equals

    β–Έ equals(yearMonth, other): boolean

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:72


    isEqual

    β–Έ isEqual(yearMonth, other): boolean

    alias for equals

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:76


    isBefore

    β–Έ isBefore(yearMonth, other): boolean

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:77


    isAfter

    β–Έ isAfter(yearMonth, other): boolean

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:78


    isEqualOrBefore

    β–Έ isEqualOrBefore(yearMonth, other): boolean

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:79


    isEqualOrAfter

    β–Έ isEqualOrAfter(yearMonth, other): boolean

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:80


    toDate

    β–Έ toDate(yearMonth, day): Date

    Parameters

    NameType
    yearMonthYearMonth
    daynumber

    Returns

    Date

    Defined in

    types/IYearMonthFns.ts:81


    getFields

    β–Έ getFields(yearMonth): YearMonthSlots

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    YearMonthSlots

    Defined in

    types/IYearMonthFns.ts:82


    from

    β–Έ from(item, options?): YearMonth

    Parameters

    NameType
    itemany
    options?Object
    options.overflowTemporalOverflow

    Returns

    YearMonth

    Defined in

    types/IYearMonthFns.ts:83


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneYearMonth
    twoYearMonth

    Returns

    number

    Defined in

    types/IYearMonthFns.ts:84


    format

    β–Έ format(yearMonth, format): string

    summary Format the ZonedDateTime.

    description +

    YearMonth

    Ζ¬ YearMonth: Format["YYYY-MM"] & string

    A Iso.YearMonth represents a particular month on the calendar. For example, it could be used to represent a particular instance of a monthly recurring event, like "the June 2019 meeting".

    Iso.YearMonth refers to the whole of a specific month; if you need to refer to a calendar event on a certain day, use Iso.Date or even Iso.DateTime. A Iso.YearMonth can be converted into a Iso.Date by combining it with a day of the month, using the toDate() function.

    Defined in

    iso-types.ts:104

    fromNumbers

    β–Έ fromNumbers(year, month): YearMonth

    Parameters

    NameType
    yearnumber
    monthnumber

    Returns

    YearMonth

    Defined in

    types/IYearMonthFns.ts:7


    isValid

    β–Έ isValid(yearMonth): yearMonth is YearMonth

    Parameters

    NameType
    yearMonthunknown

    Returns

    yearMonth is YearMonth

    Defined in

    types/IYearMonthFns.ts:8


    assertIsValid

    β–Έ assertIsValid(yearMonth): asserts yearMonth is YearMonth

    Parameters

    NameType
    yearMonthunknown

    Returns

    asserts yearMonth is YearMonth

    Defined in

    types/IYearMonthFns.ts:9


    getYear

    β–Έ getYear(yearMonth): number

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    number

    Defined in

    types/IYearMonthFns.ts:10


    getMonth

    β–Έ getMonth(yearMonth): number

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    number

    Defined in

    types/IYearMonthFns.ts:11


    getDaysInMonth

    β–Έ getDaysInMonth(yearMonth): number

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    number

    Defined in

    types/IYearMonthFns.ts:12


    getDaysInYear

    β–Έ getDaysInYear(yearMonth): number

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    number

    Defined in

    types/IYearMonthFns.ts:13


    inLeapYear

    β–Έ inLeapYear(yearMonth): boolean

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:14


    with

    β–Έ with(yearMonth, yearMonthLike, options?): YearMonth

    Parameters

    NameType
    yearMonthYearMonth
    yearMonthLikeObject
    yearMonthLike.year?number
    yearMonthLike.month?number
    options?Object
    options.overflowTemporalOverflow

    Returns

    YearMonth

    Defined in

    types/IYearMonthFns.ts:15


    add

    β–Έ add(yearMonth, temporalDurationLike, options?): YearMonth

    Parameters

    NameType
    yearMonthYearMonth
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    YearMonth

    Defined in

    types/IYearMonthFns.ts:20


    subtract

    β–Έ subtract(yearMonth, temporalDurationLike, options?): YearMonth

    Parameters

    NameType
    yearMonthYearMonth
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    YearMonth

    Defined in

    types/IYearMonthFns.ts:36


    until

    β–Έ until(yearMonth, other, options?): Duration

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IYearMonthFns.ts:52


    since

    β–Έ since(yearMonth, other, options?): Duration

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IYearMonthFns.ts:62


    equals

    β–Έ equals(yearMonth, other): boolean

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:72


    isEqual

    β–Έ isEqual(yearMonth, other): boolean

    alias for equals

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:76


    isBefore

    β–Έ isBefore(yearMonth, other): boolean

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:77


    isAfter

    β–Έ isAfter(yearMonth, other): boolean

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:78


    isEqualOrBefore

    β–Έ isEqualOrBefore(yearMonth, other): boolean

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:79


    isEqualOrAfter

    β–Έ isEqualOrAfter(yearMonth, other): boolean

    Parameters

    NameType
    yearMonthYearMonth
    otherYearMonth

    Returns

    boolean

    Defined in

    types/IYearMonthFns.ts:80


    toDate

    β–Έ toDate(yearMonth, day): Date

    Parameters

    NameType
    yearMonthYearMonth
    daynumber

    Returns

    Date

    Defined in

    types/IYearMonthFns.ts:81


    getFields

    β–Έ getFields(yearMonth): YearMonthSlots

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    YearMonthSlots

    Defined in

    types/IYearMonthFns.ts:82


    from

    β–Έ from(item, options?): YearMonth

    Parameters

    NameType
    itemany
    options?Object
    options.overflowTemporalOverflow

    Returns

    YearMonth

    Defined in

    types/IYearMonthFns.ts:83


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneYearMonth
    twoYearMonth

    Returns

    number

    Defined in

    types/IYearMonthFns.ts:84


    format

    β–Έ format(yearMonth, format): string

    summary Format the ZonedDateTime.

    description Return the formatted ZonedDateTime string in the given format.

    The characters wrapped between two single quotes characters (') are escaped. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. (see the last example)

    Format of the string is based on Unicode Technical Standard #35: @@ -23,8 +23,8 @@ are marked with "2" in the last column of the table.

    format("2017-11-06", 'MMM') //=> 'Nov'

    format("2017-11-06", 'MMMM') //=> 'November'

    format("2017-11-06", 'MMMMM') //=> 'N'

    format("2017-11-06", 'MMMMMM') //=> 'November'

    format("2017-11-06", 'MMMMMMM') //=> 'November'

  • Some patterns could be unlimited length (such as yyyyyyyy). The output will be padded with zeros to match the length of the pattern.

    format("2017-11-06", 'yyyyyyyy') //=> '00002017'

  • QQQQQ could be not strictly numerical in some locales. These tokens represent the shortest form of the quarter.

  • The main difference between y and u patterns are B.C. years:

    Yearyu
    AC 111
    BC 110
    BC 22-1

    Also yy always returns the last two digits of a year, -while uu pads single digit years to 2 characters and returns other years unchanged:

    Yearyyuu
    10101
    141414
    37676376
    1453531453
  • These patterns are not in the Unicode Technical Standard #35:

    • o: ordinal number modifier
    • Characters are escaped using single quote symbols (').

    example

    // Represent 11 February 2014 in middle-endian format:
    var result = format("2014-02", 'MM/yyyy')
    //=> '02/2014'

    Parameters

    NameTypeDescription
    yearMonthYearMonththe original date
    formatstringthe string of tokens

    Returns

    string

    the formatted date string

    Defined in

    types/IYearMonthFns.ts:189


    chain

    β–Έ chain(yearMonth): IYearMonthChain

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    IYearMonthChain

    Defined in

    types/IYearMonthFns.ts:190

    - +while uu pads single digit years to 2 characters and returns other years unchanged:

    Yearyyuu
    10101
    141414
    37676376
    1453531453
  • These patterns are not in the Unicode Technical Standard #35:

    • o: ordinal number modifier
    • Characters are escaped using single quote symbols (').

    example

    // Represent 11 February 2014 in middle-endian format:
    var result = format("2014-02", 'MM/yyyy')
    //=> '02/2014'

    Parameters

    NameTypeDescription
    yearMonthYearMonththe original date
    formatstringthe string of tokens

    Returns

    string

    the formatted date string

    Defined in

    types/IYearMonthFns.ts:189


    chain

    β–Έ chain(yearMonth): IYearMonthChain

    Parameters

    NameType
    yearMonthYearMonth

    Returns

    IYearMonthChain

    Defined in

    types/IYearMonthFns.ts:190

    + \ No newline at end of file diff --git a/docs/api/ZonedDateTime/index.html b/docs/api/ZonedDateTime/index.html index 5bb05cd..60fe688 100644 --- a/docs/api/ZonedDateTime/index.html +++ b/docs/api/ZonedDateTime/index.html @@ -5,12 +5,12 @@ ZonedDateTime | iso-fns - +
    -

    ZonedDateTime

    Ζ¬ ZonedDateTime: Format["YYYY-MM-DDThh:mm-ss[.sss]+00:00[TimeZoneName]"] & string

    An Iso.ZonedDateTime is a timezone-aware date/time type that represents a real event that has happened (or will happen) at a particular instant from the perspective of a particular region on Earth. As the broadest Iso type, Iso.ZonedDateTime can be considered a combination of a Iso.TimeZone, Iso.Instant, and Iso.DateTime.

    As the only Iso type that persists a time zone, Iso.ZonedDateTime is optimized for use cases that require a time zone:

    • Arithmetic automatically adjusts for Daylight Saving Time, using the rules defined in RFC 5545 (iCalendar) and adopted in other libraries like moment.js.
    • Creating derived values (e.g. change time to 2:30AM) can avoid worrying that the result will be invalid due to the time zone's DST rules.
    • Functions are available to easily measure attributes like "length of day" or "starting time of day" which may not be the same on all days in all time zones due to DST transitions or political changes to the definitions of time zones.
    • It's easy to flip back and forth between a human-readable representation (like Iso.DateTime) and the UTC timeline (like Iso.Instant) without having to do any work to keep the two in sync.
    • A date/time, an offset, and a time zone are represented in a single string that can be sorted alphabetically by the exact time they happened. This behavior is also helpful for developers who are not sure which of those components will be needed by later readers of this data.
    • Multiple time-zone-sensitive operations can be performed in a chain without having to repeatedly provide the same time zone.

    An Iso.ZonedDateTime can be losslessly converted into every other Iso type except Iso.Duration. Iso.Instant, Iso.DateTime, Iso.Date, Iso.Time, Iso.YearMonth, and Iso.MonthDay all carry less information and can be used when complete information is not required.

    The Iso.ZonedDateTime functions are a superset of Iso.DateTime functions, which makes it easy to port code back and forth between the two types as needed. Because Iso.DateTime is not aware of time zones, in use cases where the time zone is known it's recommended to use Iso.ZonedDateTime which will automatically adjust for DST and can convert easily to Iso.Instant without having to re-specify the time zone.

    Defined in

    iso-types.ts:57

    now

    β–Έ now(timeZone?): ZonedDateTime

    This method gets the current date, time, time zone, and time zone offset according to the system settings. Optionally a time zone can be given in which the time is computed, instead of the current system time zone.

    Parameters

    NameTypeDescription
    timeZone?stringThe time zone to get the current date and time in as a string. If not given, the current system time zone will be used.

    Returns

    ZonedDateTime

    an Iso.ZonedDateTime string representing the current system date, time, time zone, and time zone offset.

    Defined in

    types/IZonedDateTimeFns.ts:18


    currentTimeZone

    β–Έ currentTimeZone(): string

    This method gets the current system time zone. This will usually be a named IANA time zone, as that is how most people configure their computers.

    Returns

    string

    a string representing the time zone according to the current system settings.

    Defined in

    types/IZonedDateTimeFns.ts:24


    fromEpochMilliseconds

    β–Έ fromEpochMilliseconds(epochMilliseconds, timeZone): ZonedDateTime

    Parameters

    NameType
    epochMillisecondsnumber
    timeZonestring

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:25


    isValid

    β–Έ isValid(zonedDateTime): zonedDateTime is ZonedDateTime

    Parameters

    NameType
    zonedDateTimeunknown

    Returns

    zonedDateTime is ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:26


    assertIsValid

    β–Έ assertIsValid(zonedDateTime): asserts zonedDateTime is ZonedDateTime

    Parameters

    NameType
    zonedDateTimeunknown

    Returns

    asserts zonedDateTime is ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:27


    getTimeZone

    β–Έ getTimeZone(zonedDateTime): string

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    string

    Defined in

    types/IZonedDateTimeFns.ts:28


    getYear

    β–Έ getYear(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:29


    getMonth

    β–Έ getMonth(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:30


    getDay

    β–Έ getDay(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:31


    getHour

    β–Έ getHour(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:32


    getMinute

    β–Έ getMinute(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:33


    getSecond

    β–Έ getSecond(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:34


    getMillisecond

    β–Έ getMillisecond(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:35


    getEpochSeconds

    β–Έ getEpochSeconds(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:36


    getEpochMilliseconds

    β–Έ getEpochMilliseconds(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:37


    getDayOfWeek

    β–Έ getDayOfWeek(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:38


    getDayOfYear

    β–Έ getDayOfYear(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:39


    getWeekOfYear

    β–Έ getWeekOfYear(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:40


    getHoursInDay

    β–Έ getHoursInDay(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:41


    getDaysInMonth

    β–Έ getDaysInMonth(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:42


    getDaysInYear

    β–Έ getDaysInYear(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:43


    inLeapYear

    β–Έ inLeapYear(zonedDateTime): boolean

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    boolean

    Defined in

    types/IZonedDateTimeFns.ts:44


    getOffset

    β–Έ getOffset(zonedDateTime): string

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    string

    Defined in

    types/IZonedDateTimeFns.ts:45


    getOffsetMilliseconds

    β–Έ getOffsetMilliseconds(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:46


    with

    β–Έ with(zonedDateTime, zonedDateTimeLike, options?): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    zonedDateTimeLikeObject
    zonedDateTimeLike.day?number
    zonedDateTimeLike.hour?number
    zonedDateTimeLike.millisecond?number
    zonedDateTimeLike.minute?number
    zonedDateTimeLike.month?number
    zonedDateTimeLike.second?number
    zonedDateTimeLike.year?number
    options?Object
    options.overflow?TemporalOverflow
    options.disambiguation?TemporalDisambiguation
    options.offset?TemporalOffset

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:47


    withDate

    β–Έ withDate(zonedDateTime, date): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    dateDate | DateSlots

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:64


    withTime

    β–Έ withTime(zonedDateTime, time): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    timeTime | Partial<TimeSlots>

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:65


    withTimeZone

    β–Έ withTimeZone(zonedDateTime, timeZone): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    timeZonestring

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:66


    add

    β–Έ add(zonedDateTime, temporalDurationLike, options?): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:67


    subtract

    β–Έ subtract(zonedDateTime, temporalDurationLike, options?): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:83


    until

    β–Έ until(zonedDateTime, other, options?): Duration

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    otherZonedDateTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IZonedDateTimeFns.ts:99


    since

    β–Έ since(zonedDateTime, other, options?): Duration

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    otherZonedDateTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IZonedDateTimeFns.ts:109


    round

    β–Έ round(zonedDateTime, options): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    optionsObject
    options.smallestUnit"day" | "hour" | "minute" | "second" | "millisecond"
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:119


    equals

    β–Έ equals(zonedDateTime, other): boolean

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    otherZonedDateTime

    Returns

    boolean

    Defined in

    types/IZonedDateTimeFns.ts:127


    startOfDay

    β–Έ startOfDay(zonedDateTime): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:128


    toInstant

    β–Έ toInstant(zonedDateTime): Instant

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    Instant

    Defined in

    types/IZonedDateTimeFns.ts:129


    toDate

    β–Έ toDate(zonedDateTime): Date

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    Date

    Defined in

    types/IZonedDateTimeFns.ts:130


    toTime

    β–Έ toTime(zonedDateTime): Time

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    Time

    Defined in

    types/IZonedDateTimeFns.ts:131


    toDateTime

    β–Έ toDateTime(zonedDateTime): DateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    DateTime

    Defined in

    types/IZonedDateTimeFns.ts:132


    toYearMonth

    β–Έ toYearMonth(zonedDateTime): YearMonth

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    YearMonth

    Defined in

    types/IZonedDateTimeFns.ts:133


    toMonthDay

    β–Έ toMonthDay(zonedDateTime): MonthDay

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    MonthDay

    Defined in

    types/IZonedDateTimeFns.ts:134


    getFields

    β–Έ getFields(zonedDateTime): Object

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    Object

    NameType
    daynumber
    hournumber
    millisecondnumber
    minutenumber
    monthnumber
    secondnumber
    yearnumber
    offsetstring
    timeZonestring

    Defined in

    types/IZonedDateTimeFns.ts:135


    from

    β–Έ from(item, options?): ZonedDateTime

    Parameters

    NameType
    itemany
    options?Object
    options.overflow?TemporalOverflow
    options.disambiguation?TemporalDisambiguation
    options.offset?TemporalOffset

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:146


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneZonedDateTime
    twoZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:154


    format

    β–Έ format(zonedDateTime, format): string

    summary Format the ZonedDateTime.

    description +

    ZonedDateTime

    Ζ¬ ZonedDateTime: Format["YYYY-MM-DDThh:mm-ss[.sss]+00:00[TimeZoneName]"] & string

    An Iso.ZonedDateTime is a timezone-aware date/time type that represents a real event that has happened (or will happen) at a particular instant from the perspective of a particular region on Earth. As the broadest Iso type, Iso.ZonedDateTime can be considered a combination of a Iso.TimeZone, Iso.Instant, and Iso.DateTime.

    As the only Iso type that persists a time zone, Iso.ZonedDateTime is optimized for use cases that require a time zone:

    • Arithmetic automatically adjusts for Daylight Saving Time, using the rules defined in RFC 5545 (iCalendar) and adopted in other libraries like moment.js.
    • Creating derived values (e.g. change time to 2:30AM) can avoid worrying that the result will be invalid due to the time zone's DST rules.
    • Functions are available to easily measure attributes like "length of day" or "starting time of day" which may not be the same on all days in all time zones due to DST transitions or political changes to the definitions of time zones.
    • It's easy to flip back and forth between a human-readable representation (like Iso.DateTime) and the UTC timeline (like Iso.Instant) without having to do any work to keep the two in sync.
    • A date/time, an offset, and a time zone are represented in a single string that can be sorted alphabetically by the exact time they happened. This behavior is also helpful for developers who are not sure which of those components will be needed by later readers of this data.
    • Multiple time-zone-sensitive operations can be performed in a chain without having to repeatedly provide the same time zone.

    An Iso.ZonedDateTime can be losslessly converted into every other Iso type except Iso.Duration. Iso.Instant, Iso.DateTime, Iso.Date, Iso.Time, Iso.YearMonth, and Iso.MonthDay all carry less information and can be used when complete information is not required.

    The Iso.ZonedDateTime functions are a superset of Iso.DateTime functions, which makes it easy to port code back and forth between the two types as needed. Because Iso.DateTime is not aware of time zones, in use cases where the time zone is known it's recommended to use Iso.ZonedDateTime which will automatically adjust for DST and can convert easily to Iso.Instant without having to re-specify the time zone.

    Defined in

    iso-types.ts:57

    now

    β–Έ now(timeZone?): ZonedDateTime

    This method gets the current date, time, time zone, and time zone offset according to the system settings. Optionally a time zone can be given in which the time is computed, instead of the current system time zone.

    Parameters

    NameTypeDescription
    timeZone?stringThe time zone to get the current date and time in as a string. If not given, the current system time zone will be used.

    Returns

    ZonedDateTime

    an Iso.ZonedDateTime string representing the current system date, time, time zone, and time zone offset.

    Defined in

    types/IZonedDateTimeFns.ts:18


    currentTimeZone

    β–Έ currentTimeZone(): string

    This method gets the current system time zone. This will usually be a named IANA time zone, as that is how most people configure their computers.

    Returns

    string

    a string representing the time zone according to the current system settings.

    Defined in

    types/IZonedDateTimeFns.ts:24


    fromEpochMilliseconds

    β–Έ fromEpochMilliseconds(epochMilliseconds, timeZone): ZonedDateTime

    Parameters

    NameType
    epochMillisecondsnumber
    timeZonestring

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:25


    isValid

    β–Έ isValid(zonedDateTime): zonedDateTime is ZonedDateTime

    Parameters

    NameType
    zonedDateTimeunknown

    Returns

    zonedDateTime is ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:26


    assertIsValid

    β–Έ assertIsValid(zonedDateTime): asserts zonedDateTime is ZonedDateTime

    Parameters

    NameType
    zonedDateTimeunknown

    Returns

    asserts zonedDateTime is ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:27


    getTimeZone

    β–Έ getTimeZone(zonedDateTime): string

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    string

    Defined in

    types/IZonedDateTimeFns.ts:28


    getYear

    β–Έ getYear(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:29


    getMonth

    β–Έ getMonth(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:30


    getDay

    β–Έ getDay(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:31


    getHour

    β–Έ getHour(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:32


    getMinute

    β–Έ getMinute(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:33


    getSecond

    β–Έ getSecond(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:34


    getMillisecond

    β–Έ getMillisecond(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:35


    getEpochSeconds

    β–Έ getEpochSeconds(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:36


    getEpochMilliseconds

    β–Έ getEpochMilliseconds(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:37


    getDayOfWeek

    β–Έ getDayOfWeek(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:38


    getDayOfYear

    β–Έ getDayOfYear(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:39


    getWeekOfYear

    β–Έ getWeekOfYear(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:40


    getHoursInDay

    β–Έ getHoursInDay(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:41


    getDaysInMonth

    β–Έ getDaysInMonth(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:42


    getDaysInYear

    β–Έ getDaysInYear(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:43


    inLeapYear

    β–Έ inLeapYear(zonedDateTime): boolean

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    boolean

    Defined in

    types/IZonedDateTimeFns.ts:44


    getOffset

    β–Έ getOffset(zonedDateTime): string

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    string

    Defined in

    types/IZonedDateTimeFns.ts:45


    getOffsetMilliseconds

    β–Έ getOffsetMilliseconds(zonedDateTime): number

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:46


    with

    β–Έ with(zonedDateTime, zonedDateTimeLike, options?): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    zonedDateTimeLikeObject
    zonedDateTimeLike.day?number
    zonedDateTimeLike.hour?number
    zonedDateTimeLike.millisecond?number
    zonedDateTimeLike.minute?number
    zonedDateTimeLike.month?number
    zonedDateTimeLike.second?number
    zonedDateTimeLike.year?number
    options?Object
    options.overflow?TemporalOverflow
    options.disambiguation?TemporalDisambiguation
    options.offset?TemporalOffset

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:47


    withDate

    β–Έ withDate(zonedDateTime, date): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    dateDate | DateSlots

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:64


    withTime

    β–Έ withTime(zonedDateTime, time): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    timeTime | Partial<TimeSlots>

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:65


    withTimeZone

    β–Έ withTimeZone(zonedDateTime, timeZone): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    timeZonestring

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:66


    add

    β–Έ add(zonedDateTime, temporalDurationLike, options?): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:67


    subtract

    β–Έ subtract(zonedDateTime, temporalDurationLike, options?): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    temporalDurationLikeDuration | { years?: number ; months?: number ; weeks?: number ; days?: number ; hours?: number ; minutes?: number ; seconds?: number ; milliseconds?: number }
    options?Object
    options.overflow?TemporalOverflow

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:83


    until

    β–Έ until(zonedDateTime, other, options?): Duration

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    otherZonedDateTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IZonedDateTimeFns.ts:99


    since

    β–Έ since(zonedDateTime, other, options?): Duration

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    otherZonedDateTime
    options?Object
    options.largestUnit?TemporalSingularUnit | TemporalPluralUnit | "auto"
    options.smallestUnit?TemporalSingularUnit | TemporalPluralUnit
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    Duration

    Defined in

    types/IZonedDateTimeFns.ts:109


    round

    β–Έ round(zonedDateTime, options): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    optionsObject
    options.smallestUnit"day" | "hour" | "minute" | "second" | "millisecond"
    options.roundingIncrement?number
    options.roundingMode?TemporalRoundingMode

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:119


    equals

    β–Έ equals(zonedDateTime, other): boolean

    Parameters

    NameType
    zonedDateTimeZonedDateTime
    otherZonedDateTime

    Returns

    boolean

    Defined in

    types/IZonedDateTimeFns.ts:127


    startOfDay

    β–Έ startOfDay(zonedDateTime): ZonedDateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:128


    toInstant

    β–Έ toInstant(zonedDateTime): Instant

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    Instant

    Defined in

    types/IZonedDateTimeFns.ts:129


    toDate

    β–Έ toDate(zonedDateTime): Date

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    Date

    Defined in

    types/IZonedDateTimeFns.ts:130


    toTime

    β–Έ toTime(zonedDateTime): Time

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    Time

    Defined in

    types/IZonedDateTimeFns.ts:131


    toDateTime

    β–Έ toDateTime(zonedDateTime): DateTime

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    DateTime

    Defined in

    types/IZonedDateTimeFns.ts:132


    toYearMonth

    β–Έ toYearMonth(zonedDateTime): YearMonth

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    YearMonth

    Defined in

    types/IZonedDateTimeFns.ts:133


    toMonthDay

    β–Έ toMonthDay(zonedDateTime): MonthDay

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    MonthDay

    Defined in

    types/IZonedDateTimeFns.ts:134


    getFields

    β–Έ getFields(zonedDateTime): Object

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    Object

    NameType
    daynumber
    hournumber
    millisecondnumber
    minutenumber
    monthnumber
    secondnumber
    yearnumber
    offsetstring
    timeZonestring

    Defined in

    types/IZonedDateTimeFns.ts:135


    from

    β–Έ from(item, options?): ZonedDateTime

    Parameters

    NameType
    itemany
    options?Object
    options.overflow?TemporalOverflow
    options.disambiguation?TemporalDisambiguation
    options.offset?TemporalOffset

    Returns

    ZonedDateTime

    Defined in

    types/IZonedDateTimeFns.ts:146


    compare

    β–Έ compare(one, two): number

    Parameters

    NameType
    oneZonedDateTime
    twoZonedDateTime

    Returns

    number

    Defined in

    types/IZonedDateTimeFns.ts:154


    format

    β–Έ format(zonedDateTime, format): string

    summary Format the ZonedDateTime.

    description Return the formatted ZonedDateTime string in the given format.

    The characters wrapped between two single quotes characters (') are escaped. Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. (see the last example)

    Format of the string is based on Unicode Technical Standard #35: @@ -23,8 +23,8 @@ are marked with "2" in the last column of the table.

    format("2017-11-06", 'MMM') //=> 'Nov'

    format("2017-11-06", 'MMMM') //=> 'November'

    format("2017-11-06", 'MMMMM') //=> 'N'

    format("2017-11-06", 'MMMMMM') //=> 'November'

    format("2017-11-06", 'MMMMMMM') //=> 'November'

  • Some patterns could be unlimited length (such as yyyyyyyy). The output will be padded with zeros to match the length of the pattern.

    format("2017-11-06", 'yyyyyyyy') //=> '00002017'

  • QQQQQ could be not strictly numerical in some locales. These tokens represent the shortest form of the quarter.

  • The main difference between y and u patterns are B.C. years:

    Yearyu
    AC 111
    BC 110
    BC 22-1

    Also yy always returns the last two digits of a year, -while uu pads single digit years to 2 characters and returns other years unchanged:

    Yearyyuu
    10101
    141414
    37676376
    1453531453
  • These patterns are not in the Unicode Technical Standard #35:

    • i: ISO day of week
    • I: ISO week of year
    • o: ordinal number modifier
    • P: long localized date
    • p: long localized time
    • Characters are escaped using single quote symbols (').

    example

    // Represent 11 February 2014 in middle-endian format:
    var result = format("2014-02-11T00:00:00+00:00[UTC]", 'MM/dd/yyyy')
    //=> '02/11/2014'

    Parameters

    NameTypeDescription
    zonedDateTimeZonedDateTimethe original date
    formatstringthe string of tokens

    Returns

    string

    the formatted date string

    Defined in

    types/IZonedDateTimeFns.ts:335


    chain

    β–Έ chain(zonedDateTime): IZonedDateTimeChain

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    IZonedDateTimeChain

    Defined in

    types/IZonedDateTimeFns.ts:336

    - +while uu pads single digit years to 2 characters and returns other years unchanged:

    Yearyyuu
    10101
    141414
    37676376
    1453531453
  • These patterns are not in the Unicode Technical Standard #35:

    • i: ISO day of week
    • I: ISO week of year
    • o: ordinal number modifier
    • P: long localized date
    • p: long localized time
    • Characters are escaped using single quote symbols (').

    example

    // Represent 11 February 2014 in middle-endian format:
    var result = format("2014-02-11T00:00:00+00:00[UTC]", 'MM/dd/yyyy')
    //=> '02/11/2014'

    Parameters

    NameTypeDescription
    zonedDateTimeZonedDateTimethe original date
    formatstringthe string of tokens

    Returns

    string

    the formatted date string

    Defined in

    types/IZonedDateTimeFns.ts:335


    chain

    β–Έ chain(zonedDateTime): IZonedDateTimeChain

    Parameters

    NameType
    zonedDateTimeZonedDateTime

    Returns

    IZonedDateTimeChain

    Defined in

    types/IZonedDateTimeFns.ts:336

    + \ No newline at end of file diff --git a/docs/comparison/index.html b/docs/comparison/index.html index 8c986ad..fd830a9 100644 --- a/docs/comparison/index.html +++ b/docs/comparison/index.html @@ -5,13 +5,13 @@ Comparison | iso-fns - +

    Comparison

    Featureiso-fnsMomentdate-fnsTemporal ProposalLuxonjs-joda
    Multi-domainβœ…πŸš«πŸš«βœ…πŸš«βœ…
    Immutableβœ…πŸš«βš οΈβœ…βœ…βœ…
    Functionalβœ…πŸš«βœ…πŸš«πŸš«πŸš«
    Method Chainingβš οΈβœ…βš οΈβœ…βœ…βœ…
    - + \ No newline at end of file diff --git a/docs/intro/index.html b/docs/intro/index.html index 278e80b..fa65d5a 100644 --- a/docs/intro/index.html +++ b/docs/intro/index.html @@ -5,13 +5,13 @@ Intro | iso-fns - +

    Intro

    iso-fns is the only multi-domain, immutable, functional DateTime package for JavaScript. Its goal is to help you write bug free date/time logic without all the hassle. Inspired by date-fns, js-joda, and the Temporal Proposal for EcmaScript, iso-fns seeks to be simple, feature-rich, and performant.

    Multi-domain

    Dates and times are complicated. JavaScript's native Date object, while simple, does not have the functionality required by many modern web apps and so it is often painful to use. Because of this pain, there is now a popular Temporal Proposal which addresses many of the limitations of the Date object. iso-fns mirrors and builds upon the design of the Temporal Proposal. This means that iso-fns has eight date/time types.

    1. Instant: a fixed point in time without regard to calendar or location, e.g. July 20, 1969, at 20:17 UTC.
    2. ZonedDateTime: a timezone-aware date/time that represents a real event that has happened (or will happen) at a particular exact time from the perspective of a particular region on Earth, e.g. December 7th, 1995 at 3:24 AM in US Pacific time.
    3. DateTime: represents a calendar date and wall-clock time that does not carry time zone information, e.g. December 7th, 1995 at 3:00 PM.
    4. Date: represents a calendar date that is not associated with a particular time or time zone, e.g. August 24th, 2006.
    5. Time: represents a wall-clock time that is not associated with a particular date or time zone, e.g. 7:39 PM.
    6. YearMonth: A date without a day component. This is useful to express things like "the October 2020 meeting".
    7. MonthDay: A date without a year component. This is useful to express things like "Bastille Day is on the 14th of July".
    8. Duration: expresses a length of time, e.g. 5 minutes and 30 seconds. This is used for date/time arithmetic and for measuring differences between two dates/times.

    Immutable

    iso-fns is string based. This means that the data type for Instant, ZonedDateTime, Date, etc. is just a string, so naturally iso-types are immutable. Strings are portable, easy to inspect, easy to cache, and representable in JSON. Using strings also ensures compatibility with the Temporal Proposal when it becomes an approved part of EcmaScript.

    Functional

    Each operation in iso-fns is a function which inputs an iso8601 formatted string. This is similar to the model adopted by date-fns. Lets take a look at an example.

    dateFns.subtract('2000-01-15', {days: 20}) // '1999-12-26'

    Here, dateFns is a bag of functions used to operate on iso dates. We input a date (an ISO8601 formatted string) and what we want to subtract (20 days), and we receive '1999-12-26'. Another ISO8601 formatted string.

    Below are several more examples of functions offered by iso-fns.

    const instant1 = instantFns.fromEpochMilliseconds(0) // '1970-01-01T00:00:00.000Z'
    const instant2 = instantFns.subtract(instant1, {hours: 3, minutes: 30}) // '1969-12-31T20:30:00.000Z'

    const zDateTime1 = instantFns.toZonedDateTime(instant2, 'America/Chicago') // '1969-12-31T14:30:00.000-06:00[America/Chicago]'
    const zDateTime2 = zonedDateTimeFns.withDate(zDateTime1, '2021-06-15') // '2021-06-15T14:30:00.000-05:00[America/Chicago]'
    const zDateTime3 = zonedDateTimeFns.startOfDay(zDateTime2) // '2021-06-15T00:00:00.000-05:00[America/Chicago]'

    const time1 = zonedDateTimeFns.toTime(zDateTime3) // '00:00:00.000'
    const time2 = timeFns.add(time1, {hours: 6, minutes: 39, seconds: 30}) // '06:39:30.000'
    const time3 = timeFns.round(time2, {smallestUnit: 'minute', roundingIncrement: 15}) // '06:45:00.000'

    const dateTime1 = timeFns.toDateTime(time3, '2000-01-01') // '2000-01-01T06:45:00.000'
    const dateTime2 = dateTimeFns.with(dateTime1, { year: 2010 }) // '2010-01-01T06:45:00.000'
    const dateTime3 = dateTimeFns.withTime(dateTime2, '12:30:00.000') // '2010-01-01T12:30:00.000'

    const monthDay1 = dateTimeFns.toMonthDay(dateTime3) // '--01-01'
    const monthDay2 = monthDayFns.with(monthDay1, {month: 8 }) // '--08-01'

    const date1 = monthDayFns.toDate(monthDay2, 2010) // '2010-08-01'
    const date2 = dateFns.with(date1, { month: 12 }) // '2010-12-01'
    const date3 = dateFns.subtract(date2, {days: 20}) // '2010-11-11'

    const yearMonth1 = dateFns.toYearMonth(date3) // '2010-11'
    const yearMonth2 = yearMonthFns.add(yearMonth1, {years: 4}) // '2014-11'

    const duration1 = yearMonthFns.until(yearMonth2, '2018-06') // 'P3Y7M'
    const duration2 = durationFns.round(duration1, { relativeTo: '2014-11-01', largestUnit: 'days' }) // 'P1308D'
    const totalDays = durationFns.getDays(duration2) // 1308

    For method chaining, iso-fns using a similar strategy as Lodash. Here is the above example, using chaining.

    const instant = instantFns.fromEpochMilliseconds(0) // '1970-01-01T00:00:00.000Z'
    const zonedDateTime = instantFns.chain(instant)
    .subtract({ hours: 3, minutes: 30 })
    .toZonedDateTime('America/Chicago')
    .value()
    ) // '1969-12-31T14:30:00.000-06:00[America/Chicago]'

    const time = zonedDateTimeFns.chain(zonedDateTime)
    .withDate('2021-06-15')
    .startOfDay()
    .toTime()
    .value()
    ) // '00:00:00.000'

    const dateTime = timeFns.chain(time)
    .add({ hours: 6, minutes: 39, seconds: 30 })
    .round({ smallestUnit: 'minute', roundingIncrement: 15 })
    .toDateTime('2000-01-01')
    .value()
    ) // '2000-01-01T06:45:00.000'

    const monthDay = dateTimeFns.chain(dateTime)
    .with({ year: 2010 })
    .withTime('12:30:00.000')
    .toMonthDay()
    .value()
    ) // '--01-01'

    const date = monthDayFns.chain(monthDay)
    .with({month: 8 })
    .toDate(2010)
    .value()
    ) // '2010-08-01'

    const yearMonth = dateFns.chain(date)
    .with({ month: 12 })
    .subtract({ days: 20 })
    .toYearMonth()
    .value()
    ) // '2010-11'

    const duration = yearMonthFns.chain(yearMonth)
    .add({ years: 4 })
    .until('2018-06')
    .value()
    ) // 'P3Y7M'

    const totalDays = durationFns.chain(duration)
    .round({ relativeTo: '2014-11-01', largestUnit: 'days' })
    .getDays()
    .value()
    ) // 1308
    - + \ No newline at end of file diff --git a/docs/timezones-and-ambiguity/index.html b/docs/timezones-and-ambiguity/index.html index 3208c8b..06d22f2 100644 --- a/docs/timezones-and-ambiguity/index.html +++ b/docs/timezones-and-ambiguity/index.html @@ -5,14 +5,14 @@ Time Zones and Resolving Ambiguity | iso-fns - +

    Time Zones and Resolving Ambiguity

    Understanding Clock Time vs. Exact Time

    The core concept in iso-fns is the distinction between wall-clock time (also called "local time" or "clock time") which depends on the time zone of the clock and exact time (also called "UTC time") which is the same everywhere.

    Wall-clock time is controlled by local governmental authorities, so it can abruptly change. When Daylight Saving Time (DST) starts or if a country moves to another time zone, then local clocks will instantly change. Exact time however has a consistent global definition and is represented by a special time zone called UTC (from Wikipedia):

    Coordinated Universal Time (or UTC) is the primary time standard by which the world regulates clocks and time. It is within about 1 second of mean solar time at 0Β° longitude, and is not adjusted for daylight saving time. It is effectively a successor to Greenwich Mean Time (GMT).

    Every wall-clock time is defined using a UTC Offset: the amount of exact time that a particular clock is set ahead or behind UTC. For example, on January 19, 2020 in California, the UTC Offset (or "offset" for short) was -08:00 which means that wall-clock time in San Francisco was 8 hours behind UTC, so 10:00AM locally on that day was 18:00 UTC. However the same calendar date and wall-clock time India would have an offset of +05:30: 5Β½ hours later than UTC.

    ISO 8601 and RFC 3339 define standard representations for exact times as a date and time value, e.g. 2020-09-06T17:35:24.485Z. The Z suffix indicates that this is an exact UTC time.

    iso-fns has two types that represent exact time: Iso.Instant (which only represents exact time and no other information) and Iso.ZonedDateTime which represents exact time and a time zone.

    Another way to represent exact time is using a single number representing the amount of time after or before Unix epoch (midnight UTC on January 1, 1970). For example, Iso.Instant (an exact-time type) can be constructed using only a number value of milliseconds since epoch.

    Understanding Time Zones, Offset Changes, and DST

    A Time Zone defines the rules that control how local wall-clock time relates to UTC. You can think of a time zone as a function that accepts an exact time and returns a UTC offset, and a corresponding function for conversions in the opposite direction. (See below for why exact β†’ local conversions are 1:1, but local β†’ exact conversions can be ambiguous.)

    iso-fns uses the IANA Time Zone Database (or "TZ database"), which you can think of as a global repository of time zone functions. Each IANA time zone has:

    • A time zone ID that usually refers to a geographic area anchored by a city (e.g. Europe/Paris or Africa/Kampala) but can also denote single-offset time zones like UTC (a consistent +00:00 offset) or Etc/GMT+5 (which for historical reasons is a negative offset -05:00).
    • A time zone definition defines the offset for any UTC value since January 1, 1970. You can think of these definitions as a table that maps UTC date/time ranges (including future ranges) to specific offsets. In some time zones, temporary offset changes happen twice each year due to Daylight Saving Time (DST) starting in the Spring and ending each Fall. Offsets can also change permanently due to political changes, e.g. a country switching time zones.

    The TZ database is updated several times per year in response to political changes around the world. Each update contains changes to time zone definitions. These changes usually affect only future date/time values, but occasionally fixes are made to past ranges too, for example when new historical sources are discovered about early-20th century timekeeping.

    Wall-Clock Time, Exact Time, and Time Zones in iso-fns

    In iso-fns:

    • The Iso.Instant type represents exact time only.
    • The Iso.DateTime type represents calendar date and wall-clock time, as do other narrower types: Iso.Date, Iso.Time, Iso.YearMonth, and Iso.MonthDay. These types are all using the ISO 8601 calendar.
    • The Iso.TimeZone is a time zone ID. For each IANA time zone ID, iso-fns can convert an exact time into a wall-clock time and vice-versa. It also includes helper functions, e.g. to fetch the current time zone offset for a particular exact time.
    • The Iso.ZonedDateTime type encapsulates all of the types above: an exact time (like a Iso.Instant), its wall-clock equivalent (like a Iso.DateTime), and the time zone that links the two (like a Iso.TimeZone).

    There are two ways to get a human-readable calendar date and clock time from an Iso type that stores exact time.

    • If the exact time is already represented by a Iso.ZonedDateTime instance then the wall-clock time values are trivially available either by inspection (the wall-clock time values are in the type) or by using the functions for that type, e.g. getYear(), getHour(), or .format().
    • However, if the exact time is represented by a Iso.Instant, use a time zone to create a Iso.ZonedDateTime. Example:
    instant = '2019-09-03T08:34:05Z'
    formatOptions = {
    era: 'short',
    year: 'numeric',
    month: 'short',
    day: 'numeric',
    hour: 'numeric',
    minute: 'numeric',
    second: 'numeric'
    };

    zdt = instantFns.toZonedDateTime(instant, 'Asia/Tokyo');
    // => 2019-09-03T17:34:05.000+09:00[Asia/Tokyo]

    Conversions from calendar date and/or wall clock time to exact time are also supported:

    // Convert various local time types to an exact time type by providing a time zone
    date = '2019-12-17'
    // If time is omitted, local time defaults to start of day
    zdt = dateFns.toZonedDateTime(date, 'Asia/Tokyo');
    // => 2019-12-17T00:00:00.000+09:00[Asia/Tokyo]
    zdt = dateFns.toZonedDateTime(date, { timeZone: 'Asia/Tokyo', time: '10:00' });
    // => 2019-12-17T10:00:00.000+09:00[Asia/Tokyo]
    time = '14:35:00.000'
    zdt = timeFns.toZonedDateTime(time, { timeZone: 'Asia/Tokyo', date: '2020-08-27' });
    // => 2020-08-27T14:35:00.000+09:00[Asia/Tokyo]
    dateTime = '2019-12-17T07:48:00.000'
    zdt = dateTimeFns.toZonedDateTime(dateTime, 'Asia/Tokyo');
    // => 2019-12-17T07:48:00.000+09:00[Asia/Tokyo]

    // Get the exact time in seconds or milliseconds since the UNIX epoch.
    inst = zonedDateTimeFns.toInstant(zdt);
    epochMilli = instantFns.getEpochMilliseconds(inst); // => 1576536480000
    epochSecs = instantFns.getEpochSeconds(inst); // => 1576536480

    Ambiguity Due to DST or Other Time Zone Offset Changes

    Usually, a time zone definition provides a bidirectional 1:1 mapping between any particular local date and clock time and its corresponding UTC date and time. However, near a time zone offset transition there can be time ambiguity where it's not clear what offset should be used to convert a wall-clock time into an exact time. This ambiguity leads to two possible clock times for one UTC time.

    • When offsets change in a backward direction, the same clock time will be repeated. For example, 1:30AM happened twice on Sunday, 4 November 2018 in California. The "first" 1:30AM on that date was in Pacific Daylight Time (offset -07:00). 30 exact minutes later, DST ended and Pacific Standard Time (offset -08:00) became active. After 30 more exact minutes, the "second" 1:30AM happened. This means that "1:30AM on Sunday, 4 November 2018" is not sufficient to know which 1:30AM it is. The clock time is ambiguous.
    • When offsets change in a forward direction, local clock times are skipped. For example, DST started on Sunday, 11 March 2018 in California. When the clock advanced from 1:59AM to 2:00AM, local time immediately skipped to 3:00AM. 2:30AM didn't happen! To avoid errors in this one-hour-per year case, most computing environments (including ECMAScript) will convert skipped clock times to exact times using either the offset before the transition or the offset after the transition. In both cases, resolving the ambiguity when converting the local time into exact time requires choosing which of two possible offsets to use, or deciding to throw an exception.

    Resolving Time Ambiguity in iso-fns

    In iso-fns, if the exact time or time zone offset is known, then there is no ambiguity possible. For example:

    // No ambiguity possible because source is exact time in UTC
    inst = instantFns.from('2020-09-06T17:35:24.485Z');
    // => 2020-09-06T17:35:24.485Z
    // An offset can make a local time "exact" with no ambiguity possible.
    inst = instantFns.from('2020-09-06T10:35:24.485-07:00');
    // => 2020-09-06T17:35:24.485Z
    zdt = zonedDateTimeFns.from('2020-09-06T10:35:24.485-07:00[America/Los_Angeles]');
    // => 2020-09-06T10:35:24.485-07:00[America/Los_Angeles]
    // if the source is an exact Temporal object, then no ambiguity is possible.
    zdt = instantFns.toZonedDateTime(inst, 'America/Los_Angeles');
    // => 2020-09-06T10:35:24.485-07:00[America/Los_Angeles]
    inst2 = zonedDateTimeFns.toInstant(zdt);
    // => 2020-09-06T17:35:24.485Z

    However, opportunities for ambiguity are present when creating an exact-time type (Iso.ZonedDateTime or Iso.Instant) from a non-exact source. For example:

    TODO

    - + \ No newline at end of file diff --git a/docs/why-strings/index.html b/docs/why-strings/index.html index de6aeec..463fa3c 100644 --- a/docs/why-strings/index.html +++ b/docs/why-strings/index.html @@ -5,13 +5,13 @@ Why Strings? | iso-fns - +

    Why Strings?

    JSON (JavaScript Object Notation) is now wildly popular (especially if you happen to be a JavaScript developer). JSON has three primitive types

    1. String ("example string")
    2. Number (3)
    3. Boolean (true)

    And two structural types

    1. Object ({ })
    2. Array ([ ])

    These five types make the modern web go round. Odds are, all of the data you receive from web APIs is JSON. Now traditionally in JavaScript, dates are objects, but serialized as strings. This introduces a problem with deserialization. Unlike strongly typed languages, JavaScript cannot automatically transform the serialized date strings into date objects. It's all just JSON, so it can't determine which fields to transform. This has caused much consternation in the JavaScript community over the years. See

    While the solutions above may sometimes work, they are ultimately somewhat unreliable hacks. They are just looking at string format to determine if the value should be transformed into an object. This is a problem whenever we use data types which are not offered in JSON. So iso-fns doesn’t use these types. It uses strings. It adopts a functional approach for all date operations, maintaining a natural API.

    - + \ No newline at end of file diff --git a/index.html b/index.html index 81253ba..bed1aea 100644 --- a/index.html +++ b/index.html @@ -5,13 +5,13 @@ Hello from iso-fns | iso-fns - +

    A string based date time library

    npm install iso-fns

    Multi Domain

    When it comes to dates, one size doesn't fit all. Date, Time, ZonedDateTime, etc. iso-fns has them all.

    Immutable

    Mutability makes your code harder to read, harder to write, and harder to debug. iso-fns avoids all that nonsense.

    Functional

    Pure functions have no internal state ensuring consistent behavior. This makes them a joy to work with, so iso-fns uses them everywhere.

    - + \ No newline at end of file diff --git a/playground/index.html b/playground/index.html index 22f97fd..3943845 100644 --- a/playground/index.html +++ b/playground/index.html @@ -5,13 +5,13 @@ iso-fns Playground | iso-fns - +

    Playground

    Welcome! This integrated typescript editor is for you! Please play around with it all you like. You can check function results and any error messages in the console below. Have fun!
    - + \ No newline at end of file diff --git a/search/index.html b/search/index.html index 49b6e48..7e9e29f 100644 --- a/search/index.html +++ b/search/index.html @@ -5,13 +5,13 @@ Search the documentation | iso-fns - +

    Search the documentation

    - + \ No newline at end of file