Exemplo 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;
 }
Exemplo 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));
        }
Exemplo 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);
        }
Exemplo n.º 4
0
 public SpecialDate(string type, DateTime date)
     : base(type, FormatHelpers.DateTimeToShortString(date))
 {
 }