Notice
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 |
Tags
- 객체참조 #객체
- ESLint
- NPM
- TypeScript
- 클로저
- this
- url #querystring
- lightsail nodejs apache
- jest
- git pair
- 기후변화
- #cloudfront #s3 #html 확장자 없애기
- OOP
Archives
- Today
- Total
Hello World...
Next.js13 에서 dayjs timezone 설정 후 사용해보기 본문
example
src/lib
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import timezone from 'dayjs/plugin/timezone';
dayjs.extend(utc);
dayjs.extend(timezone);
dayjs.tz.setDefault('Asia/Seoul');
export default dayjs.tz;
특정 페이지 또는 컴포넌트.tsx
import dayjs from '@/lib/dayjs-lib';
...
const exampleDate = dayjs().format('YYYY-MM-DD HH:mm');
...
'typescript' 카테고리의 다른 글
| Simple Pagination 클라이언트 (1) | 2024.01.03 |
|---|---|
| typescript 공부 시작 (0) | 2022.10.22 |
Comments