public FamilyDateTimeClass() { dateType = FamilyDateType.Unknown; timeType = FamilyTimeType.Unknown; approximate = false; badYear = false; }
public FamilyDateTimeClass(int inYear = -1000, int inMonth = -1, int inDay = -1) { dateType = FamilyDateType.YearMonthDay; timeType = FamilyTimeType.Unknown; year = inYear; month = inMonth; day = inDay; if (month < 1) { dateType = FamilyDateType.Year; } else if (day < 1) { dateType = FamilyDateType.YearMonth; } approximate = false; badYear = false; }
public void SetTime(int inHour, int inMinute, int inSecond) { if ((inHour >= 0) && (inHour <= 24)) { hour = inHour; if ((inMinute >= 0) && (inMinute <= 59)) { minute = inMinute; if ((inSecond >= 0) && (inSecond <= 59)) { second = inSecond; timeType = FamilyTimeType.HourMinuteSecond; } else { timeType = FamilyTimeType.HourMinute; } } else { timeType = FamilyTimeType.Hour; } } }