반응형
var objDate = new Date();
var sYear = objDate.getFullYear().toString();
var sMonth = (objDate.getMonth() + 1).toString().padLeft(2, "0");
var sDay = objDate.getDate().toString().padLeft(2, "0");
- Date() : 날짜
- getFullYear() : 연도
- getMonth() : 월
- getDate() : 일
- padLeft(A, B) / padRight(A, B) : A 길이가 되도록 B로 채우기.
'Nexacro > 예제' 카테고리의 다른 글
[Nexacro] 다양한 Grid Displaytype 예제 (0) | 2021.11.26 |
---|---|
[Nexacro] Dynamic Creation - 스크립트로 컴포넌트 생성/데이터 바인딩 (2) | 2021.11.24 |
[Nexacro] 팝업창 띄우기(Modal VS Modaless) (0) | 2021.11.24 |
[Nexacro] 타이머 (0) | 2021.11.24 |
[Nexacro] Form 예제 - 폼의 오브젝트/컴포넌트 정보 구하기 (0) | 2021.11.24 |
댓글