setYear()
Sets the value of the Year
calendar field.
Syntax
Calendar setYear(Numeric value)
- value is the year to set.
Usage
For example, set the value of the
Year
calendar field by
calling:Calendar.fromDate(Date.parseString("05/08/1999","mm/dd/yyyy")).setYear(2003).toDate().format("mm/dd/yyyy")
This
example populates a Word Box. To achieve the same goal and populate a Date
box,
call:Calendar.fromDate(Date.parseString("05/08/1999","mm/dd/yyyy")).setYear(2003).toDate()