public static boolean isToday(long when) {
Time time = new Time("GTM+8");
time.set(when);
int thenYear = time.year;
int thenMonth = time.month;
int thenMonthDay = time.monthDay;
time.set(System.currentTimeMillis());
return (thenYear == time.year)
&& (thenMonth == time.month)
&& (thenMonthDay == time.monthDay);
}
Android 判断时间是否是今天
最新推荐文章于 2021-05-31 11:18:22 发布