한국어 | [English](../../README.md) | [简体中文](../zh-cn/README.zh-CN.md) | [日本語](../ja/README-ja.md) | [Português Brasileiro](../pt-br/README-pt-br.md) | [Español (España)](../es-es/README-es-es.md) | [Русский](../ru/README-ru.md)| [עברית](./docs/he/README-he.md)

Day.js

Moment.js와 호환되는 API를 가진 경량 라이브러리 (2kB)


Gzip Size NPM Version Build Status Codecov License
Sauce Test Status

> Day.js는 대부분의 API가 Moment.js와 호환되며 최신 브라우저에서 날짜와 시간에 대한 구문 분석, 유효성 검사, 조작, 출력을 간편하게 처리하는 경량 JavaScript 라이브러리 입니다. Moment.js를 사용해본 경험이 있다면, Day.js도 쉽게 사용하실 수 있습니다. ```js dayjs() .startOf('month') .add(1, 'day') .set('year', 2018) .format('YYYY-MM-DD HH:mm:ss') ``` - 🕒 친숙한 Moment.js API와 패턴 - 💪 불변 오브젝트(Immutable) - 🔥 메소드 체인(Chainable) - 🌐 I18n 지원 - 📦 2kb 미니 라이브러리 - 👫 모든 브라우저 지원 --- ## 시작해볼까요! ### 문서 더 많은 세부 사항과 API 및 다른 문서는 [day.js.org](https://day.js.org/) 웹사이트에서 확인하실 수 있습니다. ### 설치 ```console npm install dayjs --save ``` 📚[설치 가이드](https://day.js.org/docs/en/installation/installation) ### API Day.js API를 사용하여 날짜와 시간의 구문 분석, 검증, 조작, 출력을 간편하게 처리할 수 있습니다. ```javascript dayjs('2018-08-08') // parse dayjs().format('{YYYY} MM-DDTHH:mm:ss SSS [Z] A') // display dayjs() .set('month', 3) .month() // get & set dayjs().add(1, 'year') // manipulate dayjs().isBefore(dayjs()) // query ``` 📚[API 참고](https://day.js.org/docs/en/parse/parse) ### I18n Day.js는 국제화에 대한 많은 지원을 제공하고 있습니다. 하지만 이 기능을 사용하지 않는 경우, 빌드에 포함되지 않습니다. ```javascript import 'dayjs/locale/es' // load on demand dayjs.locale('es') // use Spanish locale globally dayjs('2018-05-05') .locale('zh-cn') .format() // use Chinese Simplified locale in a specific instance ``` 📚[I18n](https://day.js.org/docs/en/i18n/i18n) ### Plugin 플러그인은 Day.js의 기능을 확장하거나 새로운 기능을 도입하기 위한 독립적인 모듈입니다. ```javascript import advancedFormat from 'dayjs/plugin/advancedFormat' // load on demand dayjs.extend(advancedFormat) // use plugin dayjs().format('Q Do k kk X x') // more available formats ``` 📚[플러그인 목록](https://day.js.org/docs/en/plugin/plugin) ### 사용 트렌드 ## License Day.js는 [MIT License](./LICENSE)를 사용합니다.