public Quote(DateTime date, string title, string content, string author) { _id = FormatHelpers.DateTimeToShortString(date); Date = date; Title = title; Content = content; Author = author; }
public static Quote GetQuote(DateTime date) { XmlNode element = db.Doc.GetElementById(FormatHelpers.DateTimeToShortString(date)); if (element == null) { return(null); } return(GetQuote(element)); }
/// <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); }
public SpecialDate(string type, DateTime date) : base(type, FormatHelpers.DateTimeToShortString(date)) { }