??
???????? ??? ??? ??? ?? ??? ? ???, ?? ?? ??? ??? ???? ?? ?????. ??? ????? ?? ?????? ? ??? ??? ???? ???? ??? ????. ????? ???? Day.js? ?? ?? ?? ? ?????? ???? ??? ??? ?? ?? ???? ?????.
? ????? Day.js? ????, ?? ??, ?????? ???? ??, ?????? ??? ???? ?? ? ???? ??? ???????.
Day.js? ??????
Day.js? ??? ?? ? ?? ??? ????? ??? ???? ?? ?? ?????? ??????, ? ?????? ??? ?? ?? ? ?? ???? ??? ? ????.
?????? ????? ?(????) ??? ?? ?(Node.Js) ?? ???? ??? ? ????.
?? ? ???? ???? ??????? ??? ? ??? ??? ?????? ???. ??? ???? ? ??? ? ????? ??? ??? ??? ???? ? ?? ???? ?? ?????.
??? Day.js? 2KB? ??? ?? ?? ??? ??? ??? ????? ?????? ??? ????? ?? ?? ? ?? ??? ???? ? ???? ?????.
??
???????? Day.js ????? ??? ????? ?? ?? ?????? ???? ???.
???????? ?????? ?????
HTML ??? ?????.<script src="path/to/dayjs/dayjs.min.js"></script>
?? jsdeliver CDN? ?? CDN? ?? ?????? ???? ? ????.
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
?????? ??????? ????? ????? ?? ??? ?????.
npm install dayjs
???? dayjs? ?????? ??? ?????.
import dayjs from 'dayjs';
? Day.js ????? ????? dayjs() ??? ?????. ??? ???? ??? ?? ??? ??? ???? ??? ?????.
const currentDate = dayjs();
?? ?? ? ??? ???? ??? ??? ?? ??? ??? ??? ? ????.
Day.js ??? ??? ? ???? ??? ???? ?? ??? ????? ??? ??? ??? ? ????? ?????.
ISO ??/?? ??
??? ??? ????? ????? ?? ISO? ?? DateTime ?? ???? ? ??? ???.
ISO(???????)? ??? ?? ??? ?? ?? ??? ?? ? ???? ? ????? ???? ??? ???? ??? ??? ?????.
ISO?? ???? ?? ? ??? ??? ??? ? ????? ???? ?????.
???? ISO DateTime ?? ???? ??? ????.
<script src="path/to/dayjs/dayjs.min.js"></script>
- ??? ?? ??? T? ????? ??? ??? ???? ?? ?? ??? ???.
- ??? ?? Z? Zulu? ???? ??? UTC(?? ???)?? ?????.
?? JavaScript Date ??? ??? ??? ISO ???? ???? ? ??? ?? toISOString() ???? ?????.
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
?? ISO DateTime ??? ?????? Day.js ?????? ? ?? ?? ??? ???????.
Day.js? ?? ?? ????
Day.js ??????? ??? ??? ???? ??? ? ? ??? ??? ??? ?? ??, ?? ??, ??, ?? ? ??? ??? ??? ? ????. ??? ?? ??? ??? ??? ? ??? ???????.
??
?? ??? ?? ??? ??? ?? ??? Day.js ??? ???? ??? ??? ?????. ?? ?? JavaScript ?? ??, ?? ??? ?? Unix ?????? dayjs() ??? ???? ??? ? ????.
npm install dayjs
?? ??
?? ?? ??? ???? ??? ??? ?? ???? ??? ? ????. ??? ??? ?? ??? ????? ?? ??? ?????.
- format(): ?? ???? ???? ?? ??? ?? ???? ??? ??? ?????.
import dayjs from 'dayjs';
??
?? ??? ???? ??? ??? ??? ???? ??? ? ????. ?? ?? ??? ???? ??? ? ????.
- add(number, timeUnit): ??? ??? ??? ?????.
const currentDate = dayjs();
- subtract(number, timeUnit): ???? ??? ??? ???.
"2024-12-25T14:30:00.049Z" // year-month-dayThour:minute:second.millisecondZ
- startOf(timeUnit): ?, ?, ? ?? ??? ?? ?? ?? ??? ???? ??? ?????.
new Date("may 9 2024").toISOString(); // Output: '2024-05-09T23:00:00.000Z'
- endOf(timeUnit): ?, ?, ? ? ?? ?? ??? ??? ??? ?????.
const date1 = dayjs(new Date()); // called with native Date object. const date2 = dayjs("2024-08-15"); // called with an ISO date string const date3 = dayjs(1665613200000); // called with a Unix timestamp
?? ?
?? ??? ?? ??? ??? ???? ??? ? ????. ?? ?? ?? ???? ?? ???? ???? ??? ? ????.
- isBefore(date): ??? ??? ???? ???? ?????.
<script src="path/to/dayjs/dayjs.min.js"></script>
- isAfter(date): ??? ??? ?? ???? ?????.
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
- isSame(date): ??? ??? ??? ??? ?????.
npm install dayjs
- isBetween(date1, date2): ??? ??? ? ?? ??? ??? ?????.
import dayjs from 'dayjs';
- isLeapYear(): ?? ??? ??? ???? ?????.
const currentDate = dayjs();
?? ?
??? ?? ??? ???? ??? ?? ??? ???? ??? ? ????. ? ??? ?? ??? ???? ??? ? ????.
- isValid(): ??? ???? ?? ?????? ??? ???? ?? ?? ?????.
"2024-12-25T14:30:00.049Z" // year-month-dayThour:minute:second.millisecondZ
?????? ?? ??
Day.js ?????? ?? ??? ???? ? ??? ? ?? ??? ?? ????? ?????. ?? ?? ???? ???????? ? ??? ?? ? ?? ??? ?? ??? ? ????.
????? ????? ?? ????? ???? ?? ??() ???? ???? dayjs? ???? ???.
- CDN? ?? ????? ?????:
new Date("may 9 2024").toISOString(); // Output: '2024-05-09T23:00:00.000Z'
- ????? ???? dayjs? ?????:
const date1 = dayjs(new Date()); // called with native Date object. const date2 = dayjs("2024-08-15"); // called with an ISO date string const date3 = dayjs(1665613200000); // called with a Unix timestamp
- ES6 ??? ???? ????? ???? ?????:
const formattedDate = dayjs().format("HH:mm:ss DD-MM-YYYY"); console.log(formattedDate); // '19:57:36 17-08-2024'
?? ???????? ?? ??? ? ?? ????? ??? ??? ? ??? ???????.
??? ????
??? ????? ??? ? ?? ?? ???? ??? ??? ???? ??? ??? ?????. ??? ??, ???? ??, ?? ?? ?? ?? ??????? ????? ??????.
??? ?? ??? ? ????? ???? ??? ?? ??? ?? ???????.
????? CDN? ?? Day.js ?????? ??? ????? ???? ???.
const futureDate = dayjs().add(5, 'days'); // Adds 5 days to the current date console.log(futureDate.format()); // Returns the added date in an ISO date format
???? ?????? ?? ??? ??? ?????? dayjs? ???? dayjs() ??? ???? ? Day.js ????? ?????.
const pastDate = dayjs().subtract(2, 'months'); // Subtracts 2 months from the current date console.log(pastDate.format()); // Returns the subtracted date in an ISO date format
??? ????? ??? ?? ?? ??? ???? ??? ?? ??? ?????. ??? ?? ??? ??? ?? ??? ???? ??? ?? ??? ??? ? ????.
const startOfMonth = dayjs().startOf('month'); // Sets the date to the start of the month console.log(startOfMonth.format()); // Returns the current date from the start of the month in an ISO date format
???? ??? ?? ??? [] ???? ?? ????? ?????.
? ??? ???? ??? ?? ?? ??? ??? ??? ?????.
const endOfMonth = dayjs().endOf('month'); // Sets the date to the end of the month console.log(endOfMonth.format()); // Returns the current date from the end of the month in an ISO date format
? ??? eventDate? ?? ????? ? ? ?? ??? ?????. ? ?? customFormat ??? sameElse ??? ??? ??? ???? ??? ?????.
??? ??? ?? ?? ?? ??? ?? ?? ??? ?? ?? ?? ?? ??? ????.
<script src="path/to/dayjs/dayjs.min.js"></script>
?? ?? customFormat ??? lastWeek ??? ??? ??? ???? ??? ?????.
RelativeTime ????
RelativeTime ????? ??? ??????? ??? ?? ??? ???? ???? ???? ?? ????? ???? day.js ???????.
????? ??? ?? ??? ???? ?? 4?? ??? API? ?????.
- .from(date, [withoutSuffix]): ???? ??? ??? ????? ??? ??? ??? ???? ?? ?? ???? ?????. WithoutSuffix ??? true?? ???? ??"ago" ???? ?????.
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
- .to(date, [withoutSuffix]): ??? ??? ???? ????? ??? ??? ??? ???? ?? ?? ???? ?????. WithoutSuffix ??? true?? ???? ??"in" ???? ?????.
npm install dayjs
- .fromNow([withoutSuffix]): ???? ??? ?? ?? ? ?????? ??? ??? ??? ???? ?? ?? ???? ?????. WithoutSuffix ??? true?? ???? ??"ago" ???? ?????.
import dayjs from 'dayjs';
- .toNow([withoutSuffix]): ?? ?? ? ??? ???? ????? ??? ??? ??? ???? ?? ?? ???? ?????. WithoutSuffix ??? true?? ???? ??"in" ???? ?????.
const currentDate = dayjs();
RelativeTime ????? ???? ??????? ?? ??? ??? ??? ?????? ???? ??? ?? ??? ?? ???????.
???? ?? ?? ??? ? ??? ??? ?? dayjs? ?? ?? ????? ???? ????.
"2024-12-25T14:30:00.049Z" // year-month-dayThour:minute:second.millisecondZ
?? ?? ?? ?? ????? ???? dayjs? ?????.
new Date("may 9 2024").toISOString(); // Output: '2024-05-09T23:00:00.000Z'
???? ?? ??? ???? ??? ??? ??? ??? ? ????.
const date1 = dayjs(new Date()); // called with native Date object. const date2 = dayjs("2024-08-15"); // called with an ISO date string const date3 = dayjs(1665613200000); // called with a Unix timestamp
? ??? ??? ?? commentPostedTime ??? ?? ???? ???? ??? ??? ?? ?? ?? ???? ???????.
???? ?? ? ??? ??
Day.js ?????? ?? ?? ? ?????? ?????. 1,900?? ??? NPM ????
? ??? ??? ????? ???? ????.?????? 46,000?? ?? github ??? 330?? ???? ??? ?? ???? ?? ??? ???? ?? JavaScript ??? ?????.
??
????? Day.js ?????? ???? ???????? ?? ? ?? ??? ???? ??? ??? ??? ?? ??? ?? ??, ??? ?? ??? ? ?? ?? ?? ??? ??? ???? ??? ???? ? ??? ???. , ??? ??? ??, ?? ?? ? ?????.
? ??? Day.js? ???? ???????? ?? ? ?? ??? ?? ??? ?? ?????. ??? ??? 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 ??? ??? ??? ?????? ?? ??? ?? ?? ??? ?? ???? ????. 1. ??? ???? ???? ?? ??? ?? ? ? ???? ??? ??? ?? ? ?? ????? ?????. 2. Angular? ?????? ??? ?? ???? ? ?? ?? ??? ??? ??? ???? ?????. 3. VUE? ???? ?? ??? ???? ?? ?? ??? ?????. ?? ?? ?? ??, ? ??, ???? ???? ? SSR? ???? ??? ??? ??? ???? ? ??? ?????. ???, ??? ??? ??? ????? ????. ??? ??? ??? ??? ?? ????.

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

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

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

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

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