public int compareTo(Object b)
    {
        if (getClass() == b.getClass())
        {
            EventModel a = (EventModel) b;
            if (year > a.year)
            {
                return 1;
            }
            if (year < a.year)
            {
                return -1;
            }
            if (month > a.month)
            {
                return 1;
            }
            if (month < a.month)
            {
                return -1;
            }
            if (day > a.day)
            {
                return 1;
            }
            if (day < a.day)
            {
                return -1;
            }
            if (hour > a.hour)
            {
                return 1;
            }
            if (hour < a.hour)
            {
                return -1;
            }
            return 0;
        }
        return 0;
    }