function setCeltYear(testDate)
{
	this.daysSinceEpoch = Math.floor(testDate.valueOf()/864e5) - Math.floor(epoch.valueOf()/864e5);
	i = 1;
	dayCount = yearLengths[i];
	yearLength = yearLengths[i];
	while (daysSinceEpoch >= dayCount)
	{
		yearCount++;
		yearNum++;
		if (yearCount > 19)
		{
			yearCount = 1;
			cycleCount++;
		}
		i = yearCount;
		yearStartDateValue += (yearLength*24*60*60*1000);
		yearStartDate = new Date(yearStartDateValue);
		yearLength = yearLengths[i];
		if ((yearCount == 19) && (cycleCount % 3 == 0)) { yearLength = 354; }
		if ((yearCount == 19) && (cycleCount % 45 == 0 )) { yearLength = 355; }
		dayCount += yearLength;
	}
}

function setCeltMonth(testDate)
{
	monthsInYear = 12;
	if ((yearCount == 4) || (yearCount == 9) || (yearCount == 14) || (yearCount == 19)) 
	{ 
		monthLengths[6] = 30; 
	}
	if ((cycleCount % 3 == 0) && (yearCount == 19)) { monthLengths[6] = 29; }
	if ((cycleCount % 45 == 0) && (yearCount == 19)) { monthLengths[6] = 30; }
	if ((yearCount == 2) || (yearCount == 5) || (yearCount == 7) || (yearCount == 10) || (yearCount == 13) || (yearCount == 16) || (yearCount == 18))
	{
		monthsInYear = 13;
	}
	dayCount = monthLengths[1]
	monthCount = 1;
	i = 1;
	daysSinceYearStart = Math.floor(testDate.valueOf()/864e5) - Math.floor(yearStartDate.valueOf()/864e5) + 1;
	dayNum = daysSinceYearStart;
	monthStartDateValue = Date.parse(yearStartDate);
	while (daysSinceYearStart > dayCount)
	{
		monthCount++;
		monthStartDateValue += (monthLengths[i]*24*60*60*1000);
		monthStartDate = new Date(monthStartDateValue);
		celtMonthStartDay = monthStartDate.getDay();
		i++;
		dayCount += monthLengths[i];
		dayNum = Math.floor(testDate.valueOf()/864e5) - Math.floor(monthStartDate.valueOf()/864e5) + 1;
	}
}

function getCeltDayName()
{
	getCeltDayName = dayNames[dayOfWeek];
	return getCeltDayName;
}

function getCeltDate()
{
	getCeltDate = dayNum;
	return getCeltDate;
}

function getCeltMonthName()
{
	getCeltMonthName = monthNames[monthCount];
	return getCeltMonthName;
}

function getCeltMonthName1()
{
	getCeltMonthName1 = monthNames[monthCount];
	return getCeltMonthName1;
}

function getCeltMonthLength()
{
	getCeltMonthLength = monthLengths[monthCount];
	return getCeltMonthLength;
}

function getCeltYear()
{
	getCeltYear = yearNum;
	return getCeltYear;
}

function getCeltFullDate()
{
	getCeltFullDate = dayNames[dayOfWeek] + ', ' + dayNum + ' ' + monthNames[monthCount] + ' ' + yearNum;
	return getCeltFullDate;
}

function getCeltCount1()
{
	getCeltCount = cycleCount + '.' + yearCount + '.' + monthCount + '.' + dayNum;
	return getCeltCount;
}

function getCeltYearCount()
{
	getCeltYearCount = yearCount;
	return getCeltYearCount;
}

function testOutput()
{
	testOutput = cycleCount + '.' + yearCount + '.' + monthCount + '.' + dayNum + ' ' + monthNames[monthCount] + ' ' + yearNum + ' ' + dayNames[dayOfWeek] + ' (' + yearStartDate.toDateString() + ', ' + monthStartDate.toDateString() + ', ' + testDate.toDateString() + ')';
	return testOutput;
}
