public YearlyPeriod(long startDay, long endDay) throws IllegalArgumentException {
		long totalDays;
		int yearLength = 384;
        
		if (startDay < 0)
			throw new IllegalArgumentException("startDay is negative");
		if (endDay < 0)
			throw new IllegalArgumentException("endDay is negative");
		if (startDay > (yearLength - 1))
			throw new IllegalArgumentException("startDay is outside of the year");
		if (endDay > (yearLength - 1))
			throw new IllegalArgumentException("endDay is outside of the year");
		
		if (startDay > endDay) {
			totalDays = (yearLength - startDay) + endDay + 1;
		} else {
			totalDays = endDay - startDay + 1;
		}
		
		if (totalDays > yearLength)
			throw new IllegalArgumentException("too many days in range");
		
        this.startDay = startDay;
        this.endDay = endDay;
        this.totalDays = totalDays;
    }