示例#1
0
 public FamilyDateTimeClass()
 {
     dateType    = FamilyDateType.Unknown;
     timeType    = FamilyTimeType.Unknown;
     approximate = false;
     badYear     = false;
 }
示例#2
0
 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;
 }
示例#3
0
 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;
         }
     }
 }