- public java.sql.Date getDate() {
- Calendar gc = GregorianCalendar.getInstance();
- gc.set(year, month - 1, day);
- return new java.sql.Date(gc.getTime().getTime());
+ public DayDate getDate() {
+ return CalendarUtil.getDateFromComponents(year, month, day);
+ }
+
+ public static SimpleDateFormat getDateFormat() {
+ SimpleDateFormat local = fmt.get();
+ if (local == null) {
+ local = new SimpleDateFormat("yyyy-MM-dd");
+ local.setLenient(false);
+ local.setTimeZone(TimeZone.getTimeZone("UTC"));
+ fmt.set(local);
+ }
+ return local;