Example #1
0
 public static bool TryParse(string representation, out PartialTime value)
 {
     try
     {
         value = PartialTime.Parse(representation);
         return(true);
     }
     catch
     {
         value = default(PartialTime);
         return(false);
     }
 }
Example #2
0
        public bool IsEquivalentTo(PartialTime other)
        {
            if (other == null)
            {
                return(false);
            }

            var left  = toDTO();
            var right = other.toDTO();

            return((left.Year == right.Year) && (left.Month == right.Month) && (left.Day == right.Day) &&
                   (left.Hour == right.Hour) && (left.Minute == right.Minute));
        }