For the complete documentation index, see llms.txt. This page is also available as Markdown.

f.Date().getYear()

f.Date(DateString, FormatString).getYear()

개요

f.Date()로 생성된 Date객체의 연도를 문자열 형식으로 반환합니다.

예시

//f.Date().date == Thu Oct 22 2020 15:10:29 GMT+0900 (대한민국 표준시)
f.Date().getYear() // 2020
f.Date('20100101').getYear() // 2010

var nextYear = f.Date().getCalcDate('Y',1).getDate();  //20211022
f.Date(nextYear).getYear() // 2021

마지막 업데이트

도움이 되었나요?