???? Intl API ??
JavaScript? Intl API? ??? ??? ??, ??, ???? ?? ???? ??? ? ??? ???? ?? ??? ?? ??????. ?? ?? ?????? ?? ??? API? ??? ?????.
???: JavaScript ??? ???????.
? ?? ?? ??: ?? ???? ???? ????.
??? ??: ??? ?? ? ??? ?? ???? ?????.
?? ?????? ?? ???? API? ???? ????? ?? ??? ???? ????. ?? ?? JavaScript ??? ????? ??? ? ?? ??? ?? ? ??? ?? ?? ??? ?????.
? ????? ??? ???? ?? ??? ?? ??? ???? ?? API? Intl.DateTimeFormat? ??? ? ????. ? API? Moment.js, date-fns ?? Day.js? ?? ?? ???? ?????? ?? ?? ???? ???? ????? ???? ??? ???? ??? ???????.
Intl.DateTimeFormat? ?? ??
Intl.DateTimeFormat? ??? ??? ???? ??? ???? ??????. ??? ??? ??, ??? ?? ??? ??, ?? ?? ? ??? ??? ?? ?? ??? ?????.
??? ???
???? ?? ?? ??? ?? ?? ??? ???? Intl.DateTimeFormat? ???????. ???? ???? ??? ??? ?? ??? ????? ???? ??? ?? ????? ?? ?? ? ????.
???? ????? ??? ????? ?? Intl.DateTimeFormat ???? ?????.
const formatter = new Intl.DateTimeFormat(locale, options);
locale: ???? ???? ??????(?: ?? ??? ?? "en-US", ?????? ?? "it-IT").
options: ?? ?? ??(?: ??, ?, ?? ?)? ???? ??? ?????.
???? ?? ??? ????? ??? ???? ?? ?????? ? ??? ??? ??? ?? ????. ??? ?? Intl.DateTimeFormat ???? ?? ???? ?? ??? ????? ??? ? ????.
console.log(new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'long', day: 'numeric' }).format(new Date(2024, 11, 19))); // Output: "December 19, 2024"
??? ??? ????? ???? ?? ??? ??? ?? ??? ???? ?? ???? ???? ??? ???? ? ? ?? ?????.
const formatter = new Intl.DateTimeFormat(locale, options);
?? ?: Intl.DateTimeFormat ????
??? ?? ??? ?? Intl.DateTimeFormat? ???? ??? ??? ?????. ?????? ???? ???? ? ?? ?? ? ??? ?? ??? ?? ???? ???? ??? ????????.
1. ?? ??
??? ???? ??? ???? ??? ???? ?? ??? ?????.
console.log(new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'long', day: 'numeric' }).format(new Date(2024, 11, 19))); // Output: "December 19, 2024"
2. ??? ?? ??
??? ??? ???? ??? ??? ?????.
const formatter = new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'long', day: 'numeric' }); console.log(formatter.format(new Date(2024, 11, 19))); // Output: "December 19, 2024" console.log(formatter.format(new Date(2023, 5, 15))); // Output: "June 15, 2023"
?? ?: Intl.DateTimeFormat? ???? ??? ??
??? ???, ?? ??, ??? ?? ? ?? ????? ?? ?? ? ?? ??? ? ?? ? ??????. ??? ?? ??? ???????? Intl.DateTimeFormat? ???? ???? ?????.
1. ??? ??? ??
const date = new Date(2024, 11, 19); const formatter = new Intl.DateTimeFormat('en-US'); console.log(formatter.format(date)); // Output: "12/19/2024"
2. ?? ???? ?? ??
const date = new Date(2024, 11, 19); const formatter = new Intl.DateTimeFormat('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }); console.log(formatter.format(date)); // Output: "Thursday, December 19, 2024"
3. ??? ??
const date = new Date(2024, 11, 19); const italianFormatter = new Intl.DateTimeFormat('it-IT', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }); console.log(italianFormatter.format(date)); // Output: "giovedì 19 dicembre 2024"
TypeScript ? Intl.DateTimeFormat
TypeScript? ?? Intl.DateTimeFormat? ???? ?? ???? ? ?? ?? ??? ?????. Intl.DateTimeFormat? ?? TypeScript ??? ???? ?? ??? ? ??? ?? ?? ?? ? ???? ?????.
?:
const islamicFormatter = new Intl.DateTimeFormat('ar-SA-u-ca-islamic'); console.log(islamicFormatter.format(new Date(2024, 11, 19))); // Output: Date in the Islamic calendar
??? ?? ??? ??? ???? ??? ?? ? ??? ??? ???? ??? ???? ??? ??? ???? ? ??? ???.
???? ????? ??
Intl.DateTimeFormat? ???? ??? ??????
??: ???? ?? ?????? ???? ?? ?? ??? ?????.
??: ?? ????? ?? ????? ????.
??? ??: ??? ??? ??? ????? ?????.
?: ?? ?? ??
Moment.js ??
const date = new Date(Date.UTC(2024, 11, 19, 15, 30)); // Ensure the date is set in UTC // Formatter for UTC const utcFormatter = new Intl.DateTimeFormat('en-US', { timeZone: 'UTC', year: 'numeric', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit', timeZoneName: 'short', }); console.log(utcFormatter.format(date)); // Output: "Dec 19, 2024, 03:30 PM UTC" // Formatter for Tokyo time zone const tokyoFormatter = new Intl.DateTimeFormat('ja-JP', { timeZone: 'Asia/Tokyo', year: 'numeric', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit', timeZoneName: 'short', }); console.log(tokyoFormatter.format(date)); // Output: "2024/12/20 00:30 JST" // Formatter for Berlin time zone const berlinFormatter = new Intl.DateTimeFormat('de-DE', { timeZone: 'Europe/Berlin', year: 'numeric', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit', timeZoneName: 'short', }); console.log(berlinFormatter.format(date)); // Output: "19. Dez. 2024, 16:30 MEZ"
??-fns? ??
const formatter: Intl.DateTimeFormat = new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'long', day: 'numeric' }); const formattedDate: string = formatter.format(new Date(2024, 11, 19)); console.log(formattedDate); // Output: "December 19, 2024"
Day.js ??
const moment = require('moment'); console.log(moment("2024-12-19").format('dddd, MMMM Do YYYY'));
?? ?? ?? ?? ??
const { format } = require('date-fns'); console.log(format(new Date(2024, 11, 19), 'EEEE, MMMM do yyyy'));
?? ?????? ??? ??? ??? ? ??? ?? API? ????? ???? ???? ?? ??? ??? ?????. ?? API? ??? ?? ??? ?? ?? ???, ?? ? ??? ???? ??? ??????.
??
Intl.DateTimeFormat? ?? ? ?? ?? ??? ?? ??? ?? ???? ????? Moment.js, date-fns ? Day.js? ?? ?? ?????? ?? ??? ??? ???. ???, ??? ???, ???? ?? ?? ??? ?? ?? JavaScript ??????? ?? ??? ?????.
Intl.DateTimeFormat? ?? ? ??? ???? ?? ??? ????? ?? MDN ? ??? ?????. ???? ? ??? API? ??? ? ??? ?? ???? ??? ?? ??? ?? ? ????.
? ??? ?? ? ?? ??? ????? ??: Intl.DateTimeFormat? ??? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

Node.js?? HTTP ??? ???? ? ?? ???? ??? ????. 1. ?? ????? ????? ??? ??? ? ?? ????? ?? ?? ? https.get () ??? ?? ??? ??? ? ?? ????? ?? ??? ?????. 2.axios? ??? ???? ? ?? ??????. ??? ??? ??? ??? ??? ??? ???/???, ?? JSON ??, ???? ?? ?????. ??? ?? ??? ????? ?? ????. 3. ?? ??? ??? ??? ??? ???? ???? ??? ??? ???? ?????.

JavaScript ??? ??? ?? ?? ? ?? ???? ????. ?? ???? ???, ??, ??, ?, ???? ?? ? ??? ?????. ?? ????? ?? ?? ? ? ??? ????? ?? ??? ??? ????. ??, ?? ? ??? ?? ?? ??? ??? ??? ???? ??? ??? ???? ??? ?? ??? ????. ?? ? ????? ??? ???? ? ??? ? ??? TypeofNull? ??? ?????? ??? ? ????. ? ? ?? ??? ???? ?????? ????? ???? ??? ???? ? ??? ? ? ????.

?????, JavaScript ???! ?? ? JavaScript ??? ?? ?? ?????! ?? ?? ??? ??? ??? ? ????. Deno?? Oracle? ?? ??, ??? JavaScript ?? ??? ????, Google Chrome ???? ? ??? ??? ???? ?????. ?????! Deno Oracle? "JavaScript"??? ????? Oracle? ?? ??? ??? ??????. Node.js? Deno? ??? ? Ryan Dahl? ??? ?????? ???? ????? JavaScript? ??? ???? Oracle? ????? ???? ?????.

Cacheapi? ?????? ?? ???? ??? ???? ???, ?? ??? ??? ?? ???? ? ??? ?? ? ???? ??? ??????. 1. ???? ????, ??? ??, ?? ?? ?? ???? ???? ??? ? ????. 2. ??? ?? ?? ??? ?? ? ? ????. 3. ?? ?? ?? ?? ?? ??? ??? ?? ?????. 4. ??? ???? ?? ?? ???? ?? ?? ?? ?? ?? ???? ?? ?? ??? ??? ? ????. 5. ?? ???? ??, ??? ??? ? ??? ??, ?? ??? ? ?? ???? ???? ???? ? ?? ?????. 6.?? ??? ?? ?? ?? ??, ???? ?? ? HTTP ?? ????? ?????? ???????.

??? JavaScript?? ??? ??? ?????? ?? ???????. ?? ??, ?? ?? ? ??? ??? ?? ????? ????? ?????. 1. ?? ??? ??? ????? ???? ??. ()? ?? ??? ??? ?????. ?. ()? ?? ??? ?? ??? ??? ?? ? ? ????. 2. ?? ??? .catch ()? ???? ?? ??? ??? ?? ??? ??????, ??? ???? ???? ????? ??? ? ????. 3. Promise.all ()? ?? ????? (?? ?? ?? ? ??????? ??), Promise.Race () (? ?? ??? ?? ?) ? Promise.AllSettled () (?? ??? ???? ??)

.map (), .filter () ? .reduce ()? ?? JavaScript ?? ?? ???? ??? ??? ??? ? ? ????. 1) .map ()? ??? ??? ??? ???? ? ??? ???? ? ?????. 2) .filter ()? ???? ??? ????? ? ?????. 3) .reduce ()? ???? ?? ??? ???? ? ?????. ???? ??? ????? ??? ?? ?? ??? ?????.

JavaScript? ??? ??? ?? ??, ? ? ? ?? ???? ???? ??? ??? ?????. 1. ?? ??? ?? ??? ???? ??? ??? ??? ??? ?? WebAPI? ?????. 2. WebAPI? ??????? ??? ?? ? ? ??? ?? ??? (??? ?? ?? ???? ??)? ????. 3. ??? ??? ?? ??? ?? ??? ?????. ?? ??? ??? ????? ??? ??? ?? ? ???? ?????. 4. ???? ?? (? : Promise. 5. ??? ??? ???? ?? ???? ???? ?? ?? ?? ??? ????? ? ??????.

??? ??? ?? ???? ?? ??? ???? ?? ??? ??? ?? ??? ?? ??? ?????. 1. ??? ?? : ?? ??? ?? ? ? ???? ?? ??? ???? ??? ???? ??????. ?? ??, ??? ?? ? ? ?? ??? ?? ? ?? ??? ??????. 2. ??? ?? : ??? ???? ?? ?? ??? ?? ???? ????? ? ?? ?????? ???? ????? ? ?? ?? ??? true? ??????. 3. ?? ???? ?? ?? ??? ?? ??, ?? ??? ? ?? ???? ?????. 4. DOM ??? ???? ??, ?? ? ??? ? ??? ??? ?? ???? ?? ???? ?????.
