private int Compare(DateEntry x, DateEntry y)
        {
            int ret;

            if (TryCompare(x, y, out ret))
            {
                return(ret);
            }

            if (x.Year != y.Year)
            {
                return(x.Year < y.Year ? -1 : 1);
            }

            if (x.Month != y.Month)
            {
                return(x.Month < y.Month ? -1 : 1);
            }

            if (x.Day != y.Day)
            {
                return(x.Day < y.Day ? -1 : 1);
            }

            return(0);
        }
        public int DeleteEntries(DateEntry dateEntry)
        {
            var deletedCount = GetEntries().RemoveAll(entry => entry.DateEntry.Equals(dateEntry));

            return(deletedCount);
        }
 public ICollection <Entry> GetEntries(DateEntry dateEntry)
 {
     return(GetEntries().Where(entry => entry.DateEntry.Equals(dateEntry)).ToList());
 }