Here you can find the source of getDay(Date date, HashMap
public static int getDay(Date date, HashMap<String, Integer> date2day)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.*; public class Main { public static int getDay(Date date, HashMap<String, Integer> date2day) { SimpleDateFormat dateformatYYYYMMDD = new SimpleDateFormat("yyyyMMdd"); String today = dateformatYYYYMMDD.format(date); int day = date2day.get(today); return day; }//from w ww . j ava 2s . c o m }