예제 #1
0
        public bool Contains(YmdString ymdString)
        {
            var dt = ymdString.ToDateTime();

            if (dt == null)
            {
                return(false);
            }

            return(dt.Value.Year == Year &&
                   dt.Value.Month == Month);
        }
예제 #2
0
        public static YearMonth FromYmdString(YmdString ymdString)
        {
            var dateTime = ymdString.ToDateTime().Value;

            return(new YearMonth(dateTime.Year, dateTime.Month));
        }