public long nextPeriod()
		{
			final Calendar calendar=Calendar.getInstance();
			calendar.add(Calendar.MILLISECOND, -calendar.get(Calendar.MILLISECOND));
			calendar.add(Calendar.SECOND, -calendar.get(Calendar.SECOND));
			calendar.add(Calendar.MINUTE, -calendar.get(Calendar.MINUTE));
			switch(this)
			{
			case HOUR:
				calendar.add(Calendar.HOUR_OF_DAY,1);
				break;
			case DAY:
				calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY));
				calendar.add(Calendar.DATE,1);
				break;
			case WEEK:
				calendar.add(Calendar.DAY_OF_WEEK,-(calendar.get(Calendar.DAY_OF_WEEK)-1));
				calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY));
				calendar.add(Calendar.WEEK_OF_YEAR,1);
				break;
			case MONTH:
				calendar.add(Calendar.DAY_OF_MONTH,-(calendar.get(Calendar.DAY_OF_MONTH)-1));
				calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY));
				calendar.add(Calendar.MONTH,1);
				break;
			case SEASON:
				calendar.add(Calendar.DAY_OF_YEAR, -(calendar.get(Calendar.DAY_OF_YEAR) % (365/4)));
				calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY));
				calendar.add(Calendar.DAY_OF_YEAR,(365/4));
				break;
			case YEAR:
				calendar.add(Calendar.DAY_OF_YEAR,-(calendar.get(Calendar.DAY_OF_YEAR)-1));
				calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY));
				calendar.add(Calendar.YEAR,1);
				break;
			case ALLTIME:
				return Long.MAX_VALUE;
			}
			return calendar.getTimeInMillis();
		}