I will extract it into the method (in the util class, assuming other classes want this too):
class DateUtils { public static Date date(int year, int month, int date) { Calendar working = GregorianCalendar.getInstance(); working.set(year, month, date, 0, 0, 1); return working.getTime(); } }
Then just
public static final Date beforeFirstDate = DateUtils.date(1776, 6, 4);
source share