//判断当前是上午中午下午
int getTimeType(Date time) {
SimpleDateFormat df = new SimpleDateFormat("HH");
String str = df.format(time);
int a = Integer.parseInt(str);
//上午
if (a >= 0 && a <= 9) {
return 1;
}
//中午
if (a > 12 && a <= 15) {
return 2;
}
//下午
if (a > 18 && a <= 24) {
return 3;
}
return 0;
}