{"id":327867,"date":"2022-01-12T09:00:43","date_gmt":"2022-01-12T09:00:43","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=327867"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=327867","title":{"rendered":"<span>JavaScript: \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Temporal<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\" class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/cm\/yu\/dk\/cmyudkffaaxue4r760lyvmate6i.png\"\/>  <\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0434\u0440\u0443\u0437\u044c\u044f!<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e <code>Temporal<\/code>, \u043d\u043e\u0432\u043e\u043c <code>API<\/code> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0432 <code>JS<\/code>.<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/tc39\/proposal-temporal\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a><\/li>\n<li><a href=\"https:\/\/tc39.es\/proposal-temporal\/\">\u0427\u0435\u0440\u043d\u043e\u0432\u0438\u043a \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/a><\/li>\n<li><a href=\"https:\/\/tc39.es\/proposal-temporal\/docs\/cookbook.html\"><code>\u0420\u0435\u0446\u0435\u043f\u0442\u044b \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e Temporal<\/code><\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b\u0430 <a href=\"https:\/\/blog.openreplay.com\/is-it-time-for-the-javascript-temporal-api\">\u044d\u0442\u0430 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/a>.<\/p>\n<p>  <\/p>\n<p><em>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/em>: \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 3 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044f \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u043e\u0437\u0434\u0435\u0440\u0436\u0438\u0442\u0435\u0441\u044c \u043e\u0442 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d\u0435 \u0434\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f (\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0433\u0434\u0435-\u0442\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0433\u043e\u0434\u0430).<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f 2 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0432 <code>JS<\/code>:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043e\u0431\u044a\u0435\u043a\u0442 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Date\"><code>Date<\/code><\/a><\/li>\n<li>\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Intl\/DateTimeFormat\"><code>Intl.DateTimeFormat<\/code><\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 <code>Date<\/code>:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0434\u0430\u0442\u043e\u0439\/\u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438;<\/li>\n<li>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e <code>UTC<\/code> \u0438 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<\/li>\n<li>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c;<\/li>\n<li>\u0440\u0430\u0437\u0431\u043e\u0440 \u0441\u0442\u0440\u043e\u043a \u0432 \u0434\u0430\u0442\u044b \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d \u043e\u0448\u0438\u0431\u043a\u0430\u043c;<\/li>\n<li>\u043e\u0431\u044a\u0435\u043a\u0442\u044b <code>Date<\/code> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u043c\u0438, \u0442.\u0435. \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">const today = new Date() const tomorrow = new Date(today.setDate(today.getDate() + 1))  console.log(tomorrow) \/\/ \u0437\u0430\u0432\u0442\u0440\u0430\u0448\u043d\u044f\u044f \u0434\u0430\u0442\u0430 console.log(today) \/\/ \u0442\u043e\u0436\u0435 \u0437\u0430\u0432\u0442\u0440\u0430\u0448\u043d\u044f\u044f \u0434\u0430\u0442\u0430!<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u0432\u044b\u043d\u0443\u0436\u0434\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u0440\u043e\u0434\u0435 <a href=\"https:\/\/momentjs.com\/\"><code>moment.js<\/code><\/a> (\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0430) \u0438\u043b\u0438 \u0435\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b \u0442\u0438\u043f\u0430 <a href=\"https:\/\/day.js.org\/\"><code>dayjs<\/code><\/a> \u0438\u043b\u0438 <a href=\"https:\/\/date-fns.org\/\"><code>date-fns<\/code><\/a> \u043f\u0440\u0438 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u0430\u0442\u043e\u0439\/\u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c.<\/p>\n<p>  <\/p>\n<p><code>Intl.DateTimeFormat<\/code> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a \u044f\u0437\u044b\u043a\u0443 (\u043b\u043e\u043a\u0430\u043b\u0438) \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u044b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043d\u0435\u043c \u0438, \u0432 \u0446\u0435\u043b\u043e\u043c, \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 <code>Intl<\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/github.com\/harryheman\/React-Total\/blob\/main\/md\/intl.md\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<h2 id=\"temporal\"><code>Temporal<\/code><\/h2>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/qb\/zo\/mu\/qbzomud4-dtkojb1j7fje7qtqpi.png\"\/>  <\/p>\n<p>  <\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c \u0441 <code>Temporal<\/code>:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d <code>JS-\u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/www.npmjs.com\/package\/create-snowpack-app\"><code>create-snowpack-app<\/code><\/a>:<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"bash\"># temporal-test - \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 # --template @snowpack\/app-template-minimal - \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d # --use-yarn - \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c yarn \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 # --no-git - \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 yarn create snowpack-app temporal-test --template @snowpack\/app-template-minimal --use-yarn --no-git # or npx create-snowpack-app ...  # \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e cd temporal-test # \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043a\u043e\u0434\u0430 # \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 code .<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u0438\u0444\u0438\u043b <a href=\"https:\/\/www.npmjs.com\/package\/@js-temporal\/polyfill\"><code>@js-temporal\/polyfill<\/code><\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"bash\">yarn add @js-temporal\/polyfill # or npm i @js-temporal\/polyfill<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f <code>Date<\/code> \u0432 <code>index.js<\/code>:<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">import { Temporal, Intl, toTemporalInstant } from '@js-temporal\/polyfill' Date.prototype.toTemporalInstant = toTemporalInstant<\/code><\/pre>\n<p>  <\/p>\n<p><code>Temporal<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<p><strong>\u0422\u0435\u043a\u0443\u0449\u0438\u0435 \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f<\/strong><\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 <a href=\"https:\/\/tc39.es\/proposal-temporal\/#sec-temporal-now-object\"><code>Temporal.Now<\/code><\/a> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043c\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ \u0432\u0440\u0435\u043c\u044f (UTC) \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u044d\u043f\u043e\u0445\u0438, \u0442.\u0435. \u0441 00:00:00 1 \u044f\u043d\u0432\u0430\u0440\u044f 1970 \u0433\u043e\u0434\u0430 \/\/ \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 Temporal.Now.instant().epochSeconds \/\/ \u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 Temporal.Now.instant().epochMilliseconds \/\/ new Date().getTime()  \/\/ \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0437\u043e\u043d\u0430 Temporal.Now.timeZone() \/\/ Asia\/Yekaterinburg  \/\/ \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043e\u043d\u044b Temporal.Now.zonedDateTimeISO() \/\/ 2022-01-06T13:39:44.178384177+05:00[Asia\/Yekaterinburg]  \/\/ \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043e\u043d\u0435 Temporal.Now.zonedDateTimeISO('Europe\/London') \/\/ 2022-01-06T08:40:22.249422248+00:00[Europe\/London]  \/\/ \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043e\u043d\u044b Temporal.Now.plainDateTimeISO() \/\/ 2022-01-06T13:52:19.54213954  \/\/ \u0434\u0430\u0442\u0430 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043b\u043e\u043a\u0430\u0446\u0438\u0438 Temporal.Now.plainDateISO()  \/\/ \u0432\u0440\u0435\u043c\u044f \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043b\u043e\u043a\u0430\u0446\u0438\u0438 Temporal.Now.plainTimeISO()<\/code><\/pre>\n<p>  <\/p>\n<p><strong>&#171;\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u0435&#187; \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f<\/strong><\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 <a href=\"https:\/\/tc39.es\/proposal-temporal\/#sec-temporal-instant-objects\"><code>Temporal.Instant<\/code><\/a> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434. \u041f\u043e\u0437\u0438\u0446\u0438\u044f (\u0441\u0442\u0440\u043e\u043a\u0430) \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e <code>ISO 8601<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/f-\/pm\/7p\/f-pm7p1ixll80mt-nqucx_dpmgg.png\"\/>  <\/p>\n<p>  <\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">Temporal.Instant.from('2022-03-04T05:06+07:00') \/\/ 2022-03-03T22:06:00Z  \/\/ 1 \u043c\u043b\u0440\u0434. \u0441\u0435\u043a\u0443\u043d\u0434 \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u044d\u043f\u043e\u0445\u0438 Temporal.Instant.fromEpochSeconds(1.0e9) \/\/ 2001-09-09T01:46:40Z<\/code><\/pre>\n<p>  <\/p>\n<p><strong>&#171;\u0417\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435&#187; \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f<\/strong><\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 <a href=\"https:\/\/tc39.es\/proposal-temporal\/#sec-temporal-zoneddatetime-objects\"><code>Temporal.ZonedDateTime<\/code><\/a> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043e\u043d\u044b \u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">new Temporal.ZonedDateTime(  123456789000000000n, \/\/ \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u044d\u043f\u043e\u0445\u0438 (bigint)  Temporal.TimeZone.from('Asia\/Yekaterinburg'), \/\/ \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0437\u043e\u043d\u0430  Temporal.Calendar.from('iso8601') \/\/ \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c ) \/\/ 1973-11-30T02:33:09+05:00[Asia\/Yekaterinburg]  Temporal.ZonedDateTime.from('2025-09-05T02:55:00+01:00[Europe\/London]') \/\/ 2025-09-05T02:55:00+01:00[Europe\/London]  Temporal.ZonedDateTime.from({  timeZone: 'America\/New_York',  year: 2025,  month: 2,  day: 28,  hour: 10,  minute: 15,  second: 0,  millisecond: 0,  microsecond: 0,  nanosecond: 0 }) \/\/ 2025-02-28T10:15:00-05:00[America\/New_York]<\/code><\/pre>\n<p>  <\/p>\n<p><strong>&#171;\u041e\u0431\u044b\u0447\u043d\u044b\u0435&#187; \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f<\/strong><\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u044b\u0435 (plain) \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0433\u043e\u0434, \u043c\u0435\u0441\u044f\u0446, \u0434\u0435\u043d\u044c, \u0447\u0430\u0441, \u043c\u0438\u043d\u0443\u0442\u0430, \u0441\u0435\u043a\u0443\u043d\u0434\u0430 \u0438 \u0442.\u0434.) \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043e\u043d\u044b:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/tc39.es\/proposal-temporal\/#sec-temporal-plaindate-objects\"><code>Temporal.PlainDate<\/code><\/a> \u2014 \u0434\u0430\u0442\u0430:<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ 2022-01-31 new Temporal.PlainDate(2022, 1, 31) Temporal.PlainDate.from('2022-01-31')<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/tc39.es\/proposal-temporal\/#sec-temporal-plaintime-objects\"><code>Temporal.PlainTime<\/code><\/a> \u2014 \u0432\u0440\u0435\u043c\u044f:<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ 12:00:00 new Temporal.PlainTime(12, 0, 0) Temporal.PlainTime.from('12:00:00')<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/tc39.es\/proposal-temporal\/#sec-temporal-plaindatetime-objects\"><code>Temporal.PlainDateTime<\/code><\/a> \u2014 \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f:<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ 2022-01-31T12:00:00 new Temporal.PlainDateTime(2022, 1, 31, 12, 0, 0) Temporal.PlainDateTime.from('2022-01-31T12:00:00')<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/tc39.es\/proposal-temporal\/#sec-temporal-plainyearmonth-objects\"><code>Temporal.PlainYearMonth<\/code><\/a> \u2014 \u043c\u0435\u0441\u044f\u0446 \u0438 \u0433\u043e\u0434:<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ \u0438\u044e\u043d\u044c 2022 \u0433\u043e\u0434\u0430 \/\/ 2022-06 new Temporal.PlainYearMonth(2022, 6) Temporal.PlainYearMonth.from('2022-06')<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/tc39.es\/proposal-temporal\/#sec-temporal-plainmonthday-objects\"><code>Temporal.PlainMonthDay<\/code><\/a> \u2014 \u043c\u0435\u0441\u044f\u0446 \u0438 \u0434\u0435\u043d\u044c:<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ 4 \u043c\u0430\u044f \/\/ 05-04 new Temporal.PlainMonthDay(5, 4) Temporal.PlainMonthDay.from('05-04')<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u044b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/strong><\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 <code>Temporal<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u044f\u0434 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\/\u0433\u0435\u0442\u0442\u0435\u0440\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const date = Temporal.ZonedDateTime.from(  '2022-01-31T12:13:14+05:00[Asia\/Yekaterinburg]' )  date.year         \/\/ 2022 date.month        \/\/ 1 date.day          \/\/ 31 date.hour         \/\/ 12 date.minute       \/\/ 13 date.second       \/\/ 14 date.millisecond  \/\/ 0 \/\/ \u0438 \u0442.\u0434.<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>dayOfWeek<\/code> \u2014 \u043e\u0442 <code>1<\/code> \u0434\u043b\u044f \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a\u0430 \u0434\u043e <code>7<\/code> \u0434\u043b\u044f \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u044f;<\/li>\n<li><code>dayOfYear<\/code> \u2014 \u043e\u0442 <code>1<\/code> \u0434\u043e <code>365<\/code> \u0438\u043b\u0438 <code>366<\/code> \u0432 \u0432\u0438\u0441\u043e\u043a\u043e\u0441\u043d\u044b\u0439 \u0433\u043e\u0434;<\/li>\n<li><code>weekOfYear<\/code> \u2014 \u043e\u0442 <code>1<\/code> \u0434\u043e <code>52<\/code> \u0438\u043b\u0438 <code>53<\/code>;<\/li>\n<li><code>daysInMonth<\/code> \u2014 <code>28<\/code>, <code>29<\/code>, <code>30<\/code> \u0438\u043b\u0438 <code>31<\/code>;<\/li>\n<li><code>daysInYear<\/code> \u2014 <code>365<\/code> \u0438\u043b\u0438 <code>366<\/code>;<\/li>\n<li><code>inLeapYear<\/code> \u2014 <code>true<\/code> \u0434\u043b\u044f \u0432\u0438\u0441\u043e\u043a\u043e\u0441\u043d\u043e\u0433\u043e \u0433\u043e\u0434\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u0442\u044b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b <code>Temporal<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043c\u0435\u0442\u043e\u0434 <code>compare<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>0<\/code>, \u043a\u043e\u0433\u0434\u0430 <code>date1<\/code> \u0438 <code>date2<\/code> \u0440\u0430\u0432\u043d\u044b;<\/li>\n<li><code>1<\/code>, \u043a\u043e\u0433\u0434\u0430 <code>date1<\/code> &#171;\u0431\u043e\u043b\u044c\u0448\u0435&#187; (\u043d\u0430\u0441\u0442\u0443\u043f\u0438\u0442 \u0438\u043b\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u043b\u0430 \u043f\u043e\u0437\u0436\u0435), \u0447\u0435\u043c <code>date2<\/code>;<\/li>\n<li><code>-1<\/code>, \u043a\u043e\u0433\u0434\u0430 <code>date1<\/code> &#171;\u043c\u0435\u043d\u044c\u0448\u0435&#187; (\u043d\u0430\u0441\u0442\u0443\u043f\u0438\u0442 \u0438\u043b\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u043b\u0430 \u0440\u0430\u043d\u044c\u0448\u0435), \u0447\u0435\u043c <code>date2<\/code>.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">const date1 = Temporal.Now.plainDateISO() const date2 = Temporal.PlainDate.from('2022-04-05')  Temporal.PlainDateTime.compare(date1, date2) \/\/ -1<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const sortedDates = [  '2022-01-01T00:00:00[Europe\/London]',  '2022-01-01T00:00:00[Asia\/Yekaterinburg]',  '2022-01-01T00:00:00[America\/New_York]' ]  .map((d) => Temporal.ZonedDateTime.from(d))  .sort(Temporal.ZonedDateTime.compare)  console.log(sortedDates) \/*  [    '2022-01-01T00:00:00+05:00[Asia\/Yekaterinburg]',    '2022-01-01T00:00:00+00:00[Europe\/London]',    '2022-01-01T00:00:00-05:00[America\/New_York]',  ] *\/<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u044b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b <code>Temporal<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043c\u0435\u0442\u043e\u0434\u044b <code>add<\/code>, <code>subtract<\/code> \u0438 <code>round<\/code> \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (duration).<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <a href=\"https:\/\/tc39.es\/proposal-temporal\/#sec-temporal-duration-objects\"><code>Temporal.Duration<\/code><\/a>, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u0435\u043c\u0443 <code>years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u043d\u0430\u043a (sign) <code>-1<\/code> \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438 <code>1<\/code> \u0434\u043b\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u0435\u043c, \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043b\u044e\u0431\u044b\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (duration-like) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ 2022-01-06 const today = new Temporal.PlainDate(2022, 1, 6)  \/\/ \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c 1 \u0434\u0435\u043d\u044c const tomorrow = today.add({ days: 1 }) \/\/ \u0438\u043b\u0438 \/\/ \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c 2 \u0434\u043d\u044f const dayAfterTomorrow = today.add(Temporal.Duration.from({ days: 2 })) \/\/ \u0432\u044b\u0447\u0438\u0442\u0430\u0435\u043c 1 \u0434\u0435\u043d\u044c const yesterday = today.subtract({ days: 1 })  console.log(tomorrow) \/\/ 2022-01-07 console.log(dayAfterTomorrow) \/\/ 2022-01-08 console.log(yesterday) \/\/ 2022-01-05  \/\/ \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u044f\u044f \u0434\u0430\u0442\u0430 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u0439 \/\/ \u043e\u0431\u044a\u0435\u043a\u0442\u044b `Temporal` \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u043c\u0438 (\u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c\u0438) console.log(today) \/\/ 2022-01-06  const duration = Temporal.Duration.from({ days: 2, hours: 12 }) const durationInDays = duration.round({ smallestUnit: 'days' }) \/\/ 3 \u0434\u043d\u044f \/\/ https:\/\/day.js.org\/docs\/en\/durations\/as-iso-string console.log(durationInDays) \/\/ P3D<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u0438\u043d\u043f\u0443\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"html\">&lt;input type=\"date\" class=\"calendar-input\" \/><\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c &#171;\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u043e\u0435&#187; \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0431\u043e\u0440 \u0434\u0430\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Temporal<\/code> \u0438 \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Intl.DateTimeFormat<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const today = Temporal.Now.plainDateISO() const afterWeek = today.add({ days: 7 })  const calendarInput = document.querySelector('.calendar-input')  calendarInput.min = today calendarInput.max = afterWeek calendarInput.value = today  const dateFormatter = new Intl.DateTimeFormat([], {  dateStyle: 'long' })  calendarInput.onchange = ({ target: { value } }) => {  const date = Temporal.PlainDate.from(value)  const formattedDate = dateFormatter.format(date)  console.log(formattedDate) \/\/ \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 14 \u044f\u043d\u0432\u0430\u0440\u044f 2022 \u0433. }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b <code>until<\/code> \u0438 <code>since<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 <code>Temporal.Duration<\/code>, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0432\u0440\u0435\u043c\u044f \u0434\u043e \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u0442\u044b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0434\u0430\u0442\u044b\/\u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432, \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u0434\u043e d1 d1.until().months  \/\/ \u0434\u043d\u0435\u0439 \u0434\u043e d2 d2.until().days  \/\/ \u043d\u0435\u0434\u0435\u043b\u044c, \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u0441 d3 d3.since().weeks<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>equals<\/code> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438 (\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430) \u0434\u0430\u0442\u044b\/\u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const d1 = Temporal.PlainDate.from('2022-01-31') const d2 = d1.add({ days: 1 }).subtract({ hours: 24 })  console.log(  d1.equals(d2) ) \/\/ true  console.log(  Temporal.PlainDate.compare(d1, d2) ) \/\/ 0<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0421\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u0442\u044b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b <code>Temporal<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043c\u0435\u0442\u043e\u0434 <code>toString<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u044b\/\u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">Temporal.Now.zonedDateTimeISO().toString() \/\/ 2022-01-06T16:30:51.380651378+05:00[Asia\/Yekaterinburg]  Temporal.Now.plainDateTimeISO().toString() \/\/ 2022-01-06T16:32:47.870767866  Temporal.Now.plainDateISO().toString() \/\/ 2022-01-06<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u044b\/\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b <code>Intl<\/code> \u0438\u043b\u0438 <code>Date<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ \u043e\u0431\u044a\u0435\u043a\u0442 `Temporal`, \u043d\u0435 \u0441\u0442\u0440\u043e\u043a\u0430 const d1 = Temporal.Now.plainDateISO()  \/\/ ok new Intl.DateTimeFormat('ru-RU').format(d1) \/\/ 06.01.2022 new Intl.DateTimeFormat('en-US').format(d1) \/\/ 1\/6\/2022 new Intl.DateTimeFormat('de-DE').format(d1) \/\/ 6.1.2022 \/\/ \u043d\u0435 ok new Date(d1).toLocaleDateString() \/\/ error  \/\/ \u0441\u0442\u0440\u043e\u043a\u0430 const d2 = Temporal.Now.plainDateISO().toString()  \/\/ ok new Date(d2).toLocaleDateString() \/\/ 06.01.2022 \/\/ \u043d\u0435 ok new Intl.DateTimeFormat().format(d2) \/\/ error \/\/ \u043d\u043e new Intl.DateTimeFormat().format(new Date(d2)) \/\/ ok<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>Date<\/code> \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 <code>Temporal.Instant<\/code> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u043c\u0435\u0442\u043e\u0434 <code>toTemporalInstant<\/code> \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>Date<\/code>. \u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>epochMilliseconds<\/code> \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 <code>Temporal.Instant<\/code> \u0438 <code>Temporal.ZonedDateTime<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ \u0442\u0443\u0434\u0430 const legacyDate1 = new Date() const temporalInstant = legacyDate1.toTemporalInstant() \/\/ \u0441\u044e\u0434\u0430 const legacyDate2 = new Date(temporalInstant.epochMilliseconds)<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/strong><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 <code>JS<\/code> \u043d\u043e\u0432\u043e\u0433\u043e <code>API<\/code> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u043e\u0439\/\u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u2014 \u044d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>Temporal<\/code> \u0441\u043b\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c user friendly, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 <code>API<\/code>, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e <code>dayjs<\/code> \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 <code>JS-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438<\/code> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u043e\u0439\/\u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c;<\/li>\n<li>\u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>Temporal.Now.plainDateTimeISO(Temporal.Now.timeZone()).toString()<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c <code>new Date().toLocaleString()<\/code>;<\/li>\n<li>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u044b\/\u0432\u0440\u0435\u043c\u0435\u043d\u0438;<\/li>\n<li>\u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 <code>Date<\/code> \u0438 <code>Intl<\/code> \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0442.\u0434.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0435\u0441\u043b\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0430\u0442\u043e\u0439\/\u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443;<\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0428\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0430 \u043f\u043e dayjs:<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">\/\/ yarn add dayjs import dayjs from 'dayjs' \/\/ 6.8K!  \/\/ plugins import isLeapYear from 'dayjs\/plugin\/isLeapYear' import utc from 'dayjs\/plugin\/utc' import dayOfYear from 'dayjs\/plugin\/dayOfYear' import weekday from 'dayjs\/plugin\/weekday' import isoWeeksInYear from 'dayjs\/plugin\/isoWeeksInYear' import minMax from 'dayjs\/plugin\/minMax' import duration from 'dayjs\/plugin\/duration' import relativeTime from 'dayjs\/plugin\/relativeTime' import isBetween from 'dayjs\/plugin\/isBetween' import advancedFormat from 'dayjs\/plugin\/advancedFormat' import localizedFormat from 'dayjs\/plugin\/localizedFormat' import timezone from 'dayjs\/plugin\/timezone' import updateLocale from 'dayjs\/plugin\/updateLocale' import toArray from 'dayjs\/plugin\/toArray' import toObject from 'dayjs\/plugin\/toObject' import arraySupport from 'dayjs\/plugin\/arraySupport' import objectSupport from 'dayjs\/plugin\/objectSupport'  \/\/ locale import 'dayjs\/locale\/ru'  \/\/ plugins dayjs.extend(isLeapYear) dayjs.extend(utc) dayjs.extend(weekday) dayjs.extend(dayOfYear) dayjs.extend(isoWeeksInYear) dayjs.extend(minMax) dayjs.extend(duration) dayjs.extend(relativeTime) dayjs.extend(isBetween) dayjs.extend(advancedFormat) dayjs.extend(localizedFormat) dayjs.extend(timezone) dayjs.extend(updateLocale) \/\/ toArray() dayjs.extend(toArray) \/\/ toObject() dayjs.extend(toObject) \/\/ dayjs(array) dayjs.extend(arraySupport) \/\/ dayjs(object) dayjs.extend(objectSupport)  \/\/ locale \/\/ global dayjs.locale('ru') \/\/ instance \/\/ dayjs().locale('ru').format()  dayjs.updateLocale('ru', {  ordinal: (n) => `${n}\u043e\u0435` })  const localeDateTime1 = dayjs().format('DD.MM.YYYY, HH:mm:ss') console.log(localeDateTime1) \/\/ 06.01.2022, 18:55:38 \/\/ native way \/\/ new Date().toLocaleString() \/*  new Intl.DateTimeFormat([], {    dateStyle: 'short',    timeStyle: 'medium' \/\/ with seconds  }).format() *\/  const localeDateTime2 = dayjs().format('D MMMM YYYY \u0433., HH:mm:ss') console.log(localeDateTime2) \/\/ 6 \u044f\u043d\u0432\u0430\u0440\u044f 2022 \u0433., 19:01:01 \/\/ native way \/*  new Intl.DateTimeFormat([], {    day: 'numeric',    month: 'long',    year: 'numeric',    hour: '2-digit',    minute: '2-digit',    second: '2-digit'  }).format() *\/  \/\/ utc plugin const utcDateTime = dayjs.utc().format('DD.MM.YYYY, HH:mm') console.log(utcDateTime) \/\/ 06.01.2022, 14:11  \/\/ dayjs(date).isValid()  \/\/ weekday plugin const dateFormat = 'DD.MM.YYYY' const nextMonday = dayjs().weekday(7).format(dateFormat) console.log(nextMonday) \/\/ 10.01.2022  \/\/ setters\/getters \/\/ millisecond, second, minute, hour, \/\/ date, day (0 indexed), month (0 indexed), year \/\/ and some special units \/\/ or \/\/ get('year') | get('y') \/\/ set('date', 1) | set('D', 1)  \/\/ dayOfYear and isLeapYear plugins const halfOfYearDate = dayjs()  .dayOfYear(dayjs().isLeapYear() ? 366 \/ 2 : 365 \/ 2)  .format(dateFormat) console.log(halfOfYearDate) \/\/ 02.07.2022  \/\/ isoWeeksInYear plugin \/\/ isLeapYear plugin is required const weeksInThisYear = dayjs().isoWeeksInYear() console.log(weeksInThisYear) \/\/ 52  \/\/ minMax plugin \/\/ max(date1, date2, ...dateN) | max(date[]) const maxDate = dayjs  .max(dayjs(), dayjs('2021-12-31'), dayjs('2022-05-03'))  .format(dateFormat) console.log(maxDate) \/\/ 03.05.2022  \/\/ calculations \/\/ subtract(value: number, unit?: string) | subtract({ unit: value }) const today = dayjs() const yesterday = today.subtract(1, 'day').format(dateFormat) \/\/ or using duration \/\/ duration plugin is required \/\/ duration(value: number, unit?: string) | duration({ unit: value }) const anotherYesterday = today  .subtract(dayjs.duration({ day: 1 }))  .format(dateFormat) \/\/ native way \/*  const today = new Date()  const yesterday = new Date(    today.setDate(today.getDate() - 1)  ).toLocaleDateString() *\/ const dayAfterTomorrow = today.add(2, 'days').format(dateFormat) console.log(yesterday) \/\/ 05.01.2022 console.log(dayAfterTomorrow) \/\/ 08.01.2022  const lastMonday = dayjs().startOf('week').format(dateFormat) console.log(lastMonday) \/\/ 03.01.2022  const lastDayOfCurrentMonth = dayjs().endOf('month').format('dddd') console.log(lastDayOfCurrentMonth) \/\/ \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a  const timeFormat = 'HH:mm' \/\/ get UTC offset in minutes \/\/ convert minutes to hours const myUtcOffset = dayjs().utcOffset() \/ 60 console.log(myUtcOffset) \/\/ 5  \/\/ set UTC offset in hours (from -16 to 16) or minutes const localTimeFromUtc = dayjs.utc().utcOffset(myUtcOffset).format(timeFormat) console.log(localTimeFromUtc) \/\/ 19:55  \/\/ relativeTime plugin const d1 = '1380-09-08' \/\/ fromNow(withoutSuffix?: boolean) \/\/ from(date, withoutSuffix?) const fromNow = dayjs(d1).fromNow() console.log(fromNow) \/\/ 641 \u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434  const d2 = '2022-07-02' \/\/ toNow(withoutSuffix?: boolean) \/\/ to(date, withoutSuffix?) const toDate = dayjs().to(d2) console.log(toDate) \/\/ \u0447\u0435\u0440\u0435\u0437 6 \u043c\u0435\u0441\u044f\u0446\u0435\u0432  \/\/ difference const d3 = dayjs('2021-07-01') const d4 = dayjs('2022-01-01') \/\/ date1.diff(date2, unit?: string, withoutTruncate?: boolean) const diffInMonths = d4.diff(d3, 'month') console.log(diffInMonths) \/\/ 6  \/\/ unix() - in seconds const unixTimestampInMs = dayjs(d3).valueOf() console.log(unixTimestampInMs) \/\/ 1625079600000  const daysInCurrentMonth = dayjs().daysInMonth() console.log(daysInCurrentMonth) \/\/ 31  \/\/ toJSON() const currentDateInIso = dayjs().toISOString() console.log(currentDateInIso) \/\/ 2022-01-07T12:49:51.238Z  \/\/ query \/\/ default unit is ms \/\/ isBefore(date, unit?: string) \/\/ isSame(date, unit?) \/\/ isAfter(date, unit?)  \/\/ isSameOrBefore | isSameOrAfter plugins are required \/\/ isSameOrBefore(date, unit?) | isSameOrAfter(date, unit?)  \/\/ isBetween plugin is required \/\/ [ - inclusion of date, ( - exclusion \/\/ isBetween(date1, date2, unit?: string, inclusivity?: string) const isTodayStillWinter = dayjs().isBetween(  '2021-12-01',  '2022-03-01',  'day',  '[)' ) console.log(isTodayStillWinter) \/\/ true  const myTimezone = dayjs.tz.guess() console.log(myTimezone) \/\/ Asia\/Yekaterinburg  const currentDateTimeAdvanced = dayjs().format(  'Do MMMM YYYY \u0433., HH \u0447\u0430\u0441\u043e\u0432 mm \u043c\u0438\u043d\u0443\u0442 (z)' ) console.log(currentDateTimeAdvanced) \/\/ 7\u043e\u0435 \u044f\u043d\u0432\u0430\u0440\u044c 2022 \u0433., 18 \u0447\u0430\u0441\u043e\u0432 13 \u043c\u0438\u043d\u0443\u0442 (GMT+5)  const currentDateTimeLocalized = dayjs().format('LLLL (zzz)') console.log(currentDateTimeLocalized) \/\/ \u043f\u044f\u0442\u043d\u0438\u0446\u0430, 7 \u044f\u043d\u0432\u0430\u0440\u044f 2022 \u0433., 18:44 (Yekaterinburg Standard Time)  \/\/ humanize(withSuffix?: boolean) const inADay = dayjs.duration(1, 'day').humanize(true) console.log(inADay) \/\/ \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u043d\u044c<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<ul>\n<li>\u0435\u0441\u043b\u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0434\u0430\u0442\u043e\u0439\/\u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u0435, \u043d\u0435\u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0432\u044b\u0432\u043e\u0434\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>Temporal<\/code> + <code>Date<\/code> \u0438\u043b\u0438 <code>Intl.DateTimeFormat<\/code>.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u044d\u0442\u043e \u0432\u0441\u0435, \u0447\u0435\u043c \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>  <\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0438 happy coding!<\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p><a href=\"https:\/\/cloud.timeweb.com\/?utm_source=habr&amp;utm_medium=banner&amp;utm_campaign=cloud&amp;utm_content=direct&amp;utm_term=low\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/wn\/cq\/lp\/wncqlp9abeml4npwzsybuvhzcta.png\"\/><\/a><\/p>\n<\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/timeweb\/blog\/645075\/\"> https:\/\/habr.com\/ru\/company\/timeweb\/blog\/645075\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\" class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/cm\/yu\/dk\/cmyudkffaaxue4r760lyvmate6i.png\"\/>  <\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0434\u0440\u0443\u0437\u044c\u044f!<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e <code>Temporal<\/code>, \u043d\u043e\u0432\u043e\u043c <code>API<\/code> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0432 <code>JS<\/code>.<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/tc39\/proposal-temporal\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a><\/li>\n<li><a href=\"https:\/\/tc39.es\/proposal-temporal\/\">\u0427\u0435\u0440\u043d\u043e\u0432\u0438\u043a \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/a><\/li>\n<li><a href=\"https:\/\/tc39.es\/proposal-temporal\/docs\/cookbook.html\"><code>\u0420\u0435\u0446\u0435\u043f\u0442\u044b \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e Temporal<\/code><\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b\u0430 <a href=\"https:\/\/blog.openreplay.com\/is-it-time-for-the-javascript-temporal-api\">\u044d\u0442\u0430 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/a>.<\/p>\n<p>  <\/p>\n<p><em>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/em>: \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 3 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044f \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u043e\u0437\u0434\u0435\u0440\u0436\u0438\u0442\u0435\u0441\u044c \u043e\u0442 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d\u0435 \u0434\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f (\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0433\u0434\u0435-\u0442\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0433\u043e\u0434\u0430).<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-327867","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/327867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=327867"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/327867\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=327867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=327867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=327867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}