// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.*;

public class TheYear {
   public static void main(String[] args) {
      HashMap timer = new HashMap();
      timer.put(new Integer(Calendar.MONDAY), new Double(7.5));
      timer.put(new Integer(Calendar.TUESDAY), new Double(6.0));
      timer.put(new Integer(Calendar.WEDNESDAY), new Double(6.0));
      timer.put(new Integer(Calendar.THURSDAY), new Double(6.0));
      timer.put(new Integer(Calendar.FRIDAY), new Double(5.0));
      timer.put(new Integer(Calendar.SATURDAY), new Double(3.0));
      timer.put(new Integer(Calendar.SUNDAY), new Double(6.5));
      process("2005", timer);
   }
   public static void process(String year, HashMap timer) {
      int y = Integer.parseInt(year);
      Calendar cal = new GregorianCalendar();
      cal.set(Calendar.YEAR, y);
      cal.set(Calendar.MONTH, Calendar.JANUARY);
      cal.set(Calendar.DAY_OF_MONTH, 1);
      while(cal.get(Calendar.YEAR) == y) {
         System.out.println(cal.getTime() + " = " + timer.get(new Integer(cal.get(Calendar.DAY_OF_WEEK))));
         cal.add(Calendar.DAY_OF_MONTH, 1);
      }
   }
}
