using System; using System.Xml.Serialization; using System.Xml.Schema; namespace FlickrNet { /// /// The date information for a photo. /// [System.Serializable] public class PhotoDates { /// /// The date the photo was posted (or uploaded). /// [XmlIgnore] public DateTime PostedDate { get { return Utils.UnixTimestampToDate(raw_posted); } } /// /// The raw timestamp for the date the photo was posted. /// /// Use instead. [XmlAttribute("posted", Form=XmlSchemaForm.Unqualified)] public long raw_posted; /// /// The date the photo was taken. /// [XmlIgnore] public DateTime TakenDate { get { return DateTime.Parse(raw_taken); } } /// /// The raw timestamp for the date the photo was taken. /// /// Use instead. [XmlAttribute("taken", Form=XmlSchemaForm.Unqualified)] public string raw_taken; /// /// The granularity of the taken date. /// [XmlAttribute("takengranularity", Form=XmlSchemaForm.Unqualified)] public int TakenGranularity; /// /// The raw timestamp for the date the photo was last updated. /// [XmlAttribute("lastupdate", Form=XmlSchemaForm.Unqualified)] public long raw_lastupdate; /// /// The date the photo was last updated (includes comments, tags, title, description etc). /// [XmlIgnore()] public DateTime LastUpdated { get{ return Utils.UnixTimestampToDate(raw_lastupdate); } } } }