f.Date().getLastDateOfMonth()
f.Date(DateString, FormatString).getLastDateOfMonth()
마지막 업데이트
도움이 되었나요?
f.Date(DateString, FormatString).getLastDateOfMonth()
f.Date()로 생성된 Date객체의 마지막 날을 Object 형태로 반환합니다.
f.Date().getLastDateOfMonth() 만 사용 할 경우 Object 형태로 반환되기 때문에 원하는 값을 얻을 수 없다. 해당 메소드 뒤에 getDate(),format() 등의 문자열 반환 함수를 같이 사용하여야 한다.
//f.Date().date == Thu Oct 22 2020 15:10:29 GMT+0900 (대한민국 표준시)
f.Date().getLastDateOfMonth().getDate() // 202010031
f.Date().getLastDateOfMonth().getDay() //31
f.Date().getLastDateOfMonth().format('YYYY/MM/DD') //2020/10/31마지막 업데이트
도움이 되었나요?
도움이 되었나요?