//package com.leorz.smartringtone.util;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
class TimeUtils {
public static float toNumber(Date now) {
GregorianCalendar c = new GregorianCalendar();
c.setTime(now);
int hour = c.get(Calendar.HOUR_OF_DAY);// 0-23
int minute = c.get(Calendar.MINUTE);// 0-59
return toNumber(hour, minute);
}
public static float toNumber(int hour, int minute) {
return hour + minute / 60f;
}
}