The date.extractYear() method returns the number of years in a date
Parameters
- Length(Optional)
- Decimals(Optional)
Return Value
The number of years in a date
Example
pjs.define("date", { type: 'date', initValue: '2017-01-01'}) pjs.define("num", { type: "zoned", length: 7, decimals: 2}) num = date.extractYear(); return num; //2017