Esempio n. 1
0
 public Quote(DateTime date, string title, string content, string author)
 {
     _id     = FormatHelpers.DateTimeToShortString(date);
     Date    = date;
     Title   = title;
     Content = content;
     Author  = author;
 }
Esempio n. 2
0
        public static Quote GetQuote(DateTime date)
        {
            XmlNode element = db.Doc.GetElementById(FormatHelpers.DateTimeToShortString(date));

            if (element == null)
            {
                return(null);
            }

            return(GetQuote(element));
        }
Esempio n. 3
0
        /// <summary>
        /// Gets the next free slot in the database.
        /// </summary>
        /// <param name="startValue"></param>
        /// <returns></returns>
        public static DateTime?NextFreeDate(DateTime startValue)
        {
            while (startValue < DateTime.MaxValue.Date)
            {
                if (db.Doc.GetElementById(FormatHelpers.DateTimeToShortString(startValue)) == null)
                {
                    return(startValue);
                }

                startValue = startValue.AddDays(1);
            }

            return(null);
        }
Esempio n. 4
0
 public SpecialDate(string type, DateTime date)
     : base(type, FormatHelpers.DateTimeToShortString(date))
 {
 }