This example will help to verify the given time is within a period or not.
To check the time is today, We can use DateUtils class
boolean isToday = DateUtils.isToday(timeInMillis);
To check the time is within a week,
private static boolean isWithinWeek(final long millis) {
return System.c...