1 43 44 package org.jfree.date; 45 46 import java.util.Calendar ; 47 import java.util.Date ; 48 49 54 public class DateUtilities { 55 56 59 private DateUtilities() { 60 } 61 62 63 private static final Calendar CALENDAR = Calendar.getInstance(); 64 65 74 public static synchronized Date createDate(final int yyyy, final int month, final int day) { 75 CALENDAR.clear(); 76 CALENDAR.set(yyyy, month - 1, day); 77 return CALENDAR.getTime(); 78 } 79 80 91 public static synchronized Date createDate(final int yyyy, final int month, final int day, final int hour, final int min) { 92 93 CALENDAR.clear(); 94 CALENDAR.set(yyyy, month - 1, day, hour, min); 95 return CALENDAR.getTime(); 96 97 } 98 99 100 } 101 | Popular Tags |