WorldClock/Scripts/TimeData.cs
/// <summary>
/// Check to see if the past TimeData is past this TimeData
/// </summary>
/// <param name="time">The timr to check</param>
/// <returns>true if the passed TimeData is past this TimeData. false otherwise</returns>
Check to see if the past TimeData is past this TimeData
Check to see if the past TimeData is past this TimeData
public virtual bool IsAtOrPastTime(TimeData time)
    {
        if (!myGlobalTime.IsMatch(time.myGlobalTime))
        {
            Debug.LogWarning("Cannot compare. These two TimeData objects do not have the same GlobalTime.");
            return false;
        }
        if (time.years < years)
            return false;
        else if (time.years == years)
        {
            if (time.months < months)
                return false;
            else if (time.months == months)
            {
                if (time.days < days)
                    return false;
                else if (time.days == days)
                {
                    if (time.hours < hours)
                        return false;
                    else if (time.hours == hours)
                    {
                        if (time.Minutes < Minutes)
                            return false;
                        else if (time.Minutes == Minutes)
                        {
                            return true;
                        }
                        else return true;
                    }
                    else return true;
                }
                else return true;
            }
            else return true;
        }
        else return true;
    }
public virtual bool IsAtOrPastTime ( TimeData time ) { if ( ! myGlobalTime . IsMatch ( time . myGlobalTime ) ) { Debug . LogWarning ( " " ) ; return false ; } if ( time . years < years ) return false ; else if ( time . years == years ) { if ( time . months < months ) return false ; else if ( time . months == months ) { if ( time . days < days ) return false ; else if ( time . days == days ) { if ( time . hours < hours ) return false ; else if ( time . hours == hours ) { if ( time . Minutes < Minutes ) return false ; else if ( time . Minutes == Minutes ) { return true ; } else return true ; } else return true ; } else return true ; } else return true ; } else return true ; }
Check to see if the past TimeData is past this TimeData
Check to see if the past TimeData is past this TimeData
//MatchTime
true if the passed TimeData is past this TimeData. false otherwise
true if the passed TimeData is past this TimeData . false otherwise
time
TimeData
The timr to check
The timr to check