댓글 검색 목록

[Nodejs] 날짜를 파싱, 유효성 검사, 조작 및 표시합니다.

페이지 정보

작성자 운영자 작성일 19-06-23 10:07 조회 505 댓글 0

https://github.com/moment/moment 

http://momentjs.com/


moment().subtract(10, 'days').calendar(); // 2019.06.13.
moment().subtract(6, 'days').calendar();  // 지난주 월요일 오전 10:07
moment().subtract(3, 'days').calendar();  // 지난주 목요일 오전 10:07
moment().subtract(1, 'days').calendar();  // 어제 오전 10:07
moment().calendar();                      // 오늘 오전 10:07
moment().add(1, 'days').calendar();       // 내일 오전 10:07
moment().add(3, 'days').calendar();       // 수요일 오전 10:07
moment().add(10, 'days').calendar();      // 2019.07.03.
                                         
moment.locale();         // ko
moment().format('LT');   // 오전 10:08
moment().format('LTS');  // 오전 10:08:04
moment().format('L');    // 2019.06.23.
moment().format('l');    // 2019.06.23.
moment().format('LL');   // 2019년 6월 23일
moment().format('ll');   // 2019년 6월 23일
moment().format('LLL');  // 2019년 6월 23일 오전 10:08
moment().format('lll');  // 2019년 6월 23일 오전 10:08
moment().format('LLLL'); // 2019년 6월 23일 일요일 오전 10:08
moment().format('llll'); // 2019년 6월 23일 일요일 오전 10:08
                         // undefined





댓글목록 0

등록된 댓글이 없습니다.

웹학교 로고

온라인 코딩학교

코리아뉴스 2001 - , All right reserved.