public bool Contains(YmdString ymdString) { var dt = ymdString.ToDateTime(); if (dt == null) { return(false); } return(dt.Value.Year == Year && dt.Value.Month == Month); }
public static YearMonth FromYmdString(YmdString ymdString) { var dateTime = ymdString.ToDateTime().Value; return(new YearMonth(dateTime.Year, dateTime.Month)); }