internal static bool TryParseServerString(string value, out WmDate wmDate)
        {
            if (string.IsNullOrEmpty(value))
            {
                wmDate = default(WmDate);
                return(false);
            }

            DateTime serverTime;

            if (!DateTime.TryParseExact(value, Template1, CultureInfo.InvariantCulture.DateTimeFormat,
                                        DateTimeStyles.None, out serverTime))
            {
                if (!DateTime.TryParseExact(value, Template2, CultureInfo.InvariantCulture.DateTimeFormat,
                                            DateTimeStyles.None, out serverTime))
                {
                    if (!DateTime.TryParseExact(value, Template3, CultureInfo.InvariantCulture.DateTimeFormat,
                                                DateTimeStyles.None, out serverTime))
                    {
                        wmDate = default(WmDate);
                        return(false);
                    }
                }
            }

            serverTime = new DateTime(serverTime.Year, serverTime.Month, serverTime.Day, 0, 0, 0);
            wmDate     = new WmDate(WmDateTime.ServerTime2UtcTime(serverTime));
            return(true);
        }
        public static bool TryParse(string value, out WmDate wmDate)
        {
            if (string.IsNullOrEmpty(value))
            {
                wmDate = default(WmDate);
                return(false);
            }

            DateTime dateTime;

            if (
                !DateTime.TryParseExact(value, LocalTemplate, CultureInfo.InvariantCulture.DateTimeFormat,
                                        DateTimeStyles.None, out dateTime))
            {
                wmDate = default(WmDate);
                return(false);
            }

            wmDate = (WmDate)dateTime;
            return(true);
        }
 public bool Equals(WmDate other)
 {
     return(_utcTime.Year == other._utcTime.Year &&
            _utcTime.Month == other._utcTime.Month &&
            _utcTime.Day == other._utcTime.Day);
 }