Android examples for java.util:Date
get Next Date For Week from starting milliseconds
import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; public class Main{ private static final long DAY_MILLS = 1000 * 60 * 60 * 24; private static final long WEEK_MILLS = DAY_MILLS * 7; //w w w .ja va2s. co m public static long getNextDateForWeek(long startMills) { long currentMills = System.currentTimeMillis(); long nextMills = startMills; while (currentMills > nextMills) { nextMills += WEEK_MILLS; } return nextMills; } }