gt: 			return (byte) 6;
context: package org.allmyinfo.daemon;
  
  import java.util.Calendar;
  
  import org.eclipse.jdt.annotation.NonNull;
  
  public interface Period {
  	public static final @NonNull Second SECOND = new Second();
  	public static final @NonNull Minute MINUTE = new Minute();
  	public static final @NonNull Hour HOUR = new Hour();
  	public static final @NonNull Day DAY = new Day();
  	public static final @NonNull Week WEEK = new Week();
  	public static final @NonNull Month MONTH = new Month();
  	public static final @NonNull Year YEAR = new Year();
  
  	long getPreviousTime(long now);
  
  	long getNextTime(long now);
  
  	public static class Second implements Period {
  		Second() {
  		}
  
  		@Override
  		public long getPreviousTime(final long now) {
  			final Calendar calendar = Calendar.getInstance();
  			calendar.setTimeInMillis(now);
  			calendar.set(Calendar.MILLISECOND, 0);
  			return calendar.getTimeInMillis();
  		}
  
  		@Override
  		public long getNextTime(final long now) {
  			return getPreviousTime(now) + 1000;
  		}
  
  		@Override
  		public byte getIndex() {
  			return (byte) 0;
  		}
  	}
  
  	public static class Minute implements Period {
  		Minute() {
  		}
  
  		@Override
  		public long getPreviousTime(final long now) {
  			final Calendar calendar = Calendar.getInstance();
  			calendar.setTimeInMillis(now);
  			calendar.set(Calendar.SECOND, 0);
  			calendar.set(Calendar.MILLISECOND, 0);
  			return calendar.getTimeInMillis();
  		}
  
  		@Override
  		public long getNextTime(final long now) {
  			return getPreviousTime(now) + 1000 * 60;
  		}
  
  		@Override
  		public byte getIndex() {
  			return (byte) 1;
  		}
  	}
  
  	public static class Hour implements Period {
  		Hour() {
  		}
  
  		@Override
  		public long getPreviousTime(final long now) {
  			final Calendar calendar = Calendar.getInstance();
  			calendar.setTimeInMillis(now);
  			calendar.set(Calendar.MINUTE, 0);
  			calendar.set(Calendar.SECOND, 0);
  			calendar.set(Calendar.MILLISECOND, 0);
  			return calendar.getTimeInMillis();
  		}
  
  		@Override
  		public long getNextTime(final long now) {
  			return getPreviousTime(now) + 1000 * 60 * 60;
  		}
  
  		@Override
  		public byte getIndex() {
  			return (byte) 2;
  		}
  	}
  
  	public static class Day implements Period {
  		Day() {
  		}
  
  		@Override
  		public long getPreviousTime(final long now) {
  			final Calendar calendar = Calendar.getInstance();
  			calendar.setTimeInMillis(now);
  			calendar.set(Calendar.HOUR_OF_DAY, 0);
  			calendar.set(Calendar.MINUTE, 0);
  			calendar.set(Calendar.SECOND, 0);
  			calendar.set(Calendar.MILLISECOND, 0);
  			return calendar.getTimeInMillis();
  		}
  
  		@Override
  		public long getNextTime(final long now) {
  			return getPreviousTime(now) + 1000 * 60 * 60 * 24;
  		}
  
  		@Override
  		public byte getIndex() {
  			return (byte) 3;
  		}
  	}
  
  	public static class Week implements Period {
  		Week() {
  		}
  
  		@Override
  		public long getPreviousTime(final long now) {
  			final Calendar calendar = Calendar.getInstance();
  			calendar.setTimeInMillis(now);
  			calendar.set(Calendar.DAY_OF_WEEK, 1);
  			calendar.set(Calendar.HOUR_OF_DAY, 0);
  			calendar.set(Calendar.MINUTE, 0);
  			calendar.set(Calendar.SECOND, 0);
  			calendar.set(Calendar.MILLISECOND, 0);
  			return calendar.getTimeInMillis();
  		}
  
  		@Override
  		public long getNextTime(final long now) {
  			return getPreviousTime(now) + 1000 * 60 * 60 * 24 * 7;
  		}
  
  		@Override
  		public byte getIndex() {
  			return (byte) 4;
  		}
  	}
  
  	public static class Month implements Period {
  		Month() {
  		}
  
  		@Override
  		public long getPreviousTime(final long now) {
  			final Calendar calendar = Calendar.getInstance();
  			calendar.setTimeInMillis(now);
  			calendar.set(Calendar.DAY_OF_MONTH, 1);
  			calendar.set(Calendar.HOUR_OF_DAY, 0);
  			calendar.set(Calendar.MINUTE, 0);
  			calendar.set(Calendar.SECOND, 0);
  			calendar.set(Calendar.MILLISECOND, 0);
  			return calendar.getTimeInMillis();
  		}
  
  		@Override
  		public long getNextTime(final long now) {
  			final Calendar calendar = Calendar.getInstance();
  			calendar.setTimeInMillis(now);
  			calendar.add(Calendar.MONTH, 1);
  			return getPreviousTime(calendar.getTimeInMillis());
  		}
  
  		@Override
  		public byte getIndex() {
  			return (byte) 5;
  		}
  	}
  
  	public static class Year implements Period {
  		Year() {
  		}
  
  		@Override
  		public long getPreviousTime(final long now) {
  			final Calendar calendar = Calendar.getInstance();
  			calendar.setTimeInMillis(now);
  			calendar.set(Calendar.DAY_OF_YEAR, 1);
  			calendar.set(Calendar.HOUR_OF_DAY, 0);
  			calendar.set(Calendar.MINUTE, 0);
  			calendar.set(Calendar.SECOND, 0);
  			calendar.set(Calendar.MILLISECOND, 0);
  			return calendar.getTimeInMillis();
  		}
  
  		@Override
  		public long getNextTime(final long now) {
  			final Calendar calendar = Calendar.getInstance();
  			calendar.setTimeInMillis(now);
  			calendar.add(Calendar.YEAR, 1);
  			return getPreviousTime(calendar.getTimeInMillis());
  		}
  
  		@Override
  		public byte getIndex() {
  