/// <summary>Creates an <code>XMPDateTime</code>-object from initial values.</summary> /// <param name="year">years</param> /// <param name="month"> /// months from 1 to 12<br /> /// <em>Note:</em> Remember that the month in /// <see cref="System.DateTime"/> /// is defined from 0 to 11. /// </param> /// <param name="day">days</param> /// <returns>Returns an <code>XMPDateTime</code>-object.</returns> public static XMPDateTime Create(int year, int month, int day) { XMPDateTime dt = new XMPDateTimeImpl(); dt.SetYear(year); dt.SetMonth(month); dt.SetDay(day); return(dt); }
/// <summary>Creates an <code>XMPDateTime</code>-object from initial values.</summary> /// <param name="year">years</param> /// <param name="month"> /// months from 1 to 12<br /> /// <em>Note:</em> Remember that the month in /// <see cref="Sharpen.Calendar"/> /// is defined from 0 to 11. /// </param> /// <param name="day">days</param> /// <param name="hour">hours</param> /// <param name="minute">minutes</param> /// <param name="second">seconds</param> /// <param name="nanoSecond">nanoseconds</param> /// <returns>Returns an <code>XMPDateTime</code>-object.</returns> public static XMPDateTime Create(int year, int month, int day, int hour, int minute, int second, int nanoSecond) { XMPDateTime dt = new XMPDateTimeImpl(); dt.SetYear(year); dt.SetMonth(month); dt.SetDay(day); dt.SetHour(hour); dt.SetMinute(minute); dt.SetSecond(second); dt.SetNanoSecond(nanoSecond); return(dt); }
public virtual void UpdateDate(int tagType, DateTime value) { base.SetDate(tagType, value); XMPDateTime date = new XMPDateTimeImpl(value, System.TimeZoneInfo.Local); try { GetXMPMeta().SetPropertyDate(_tagSchemaMap.Get(tagType), _tagPropNameMap.Get(tagType), date); } catch (XMPException e) { Sharpen.Runtime.PrintStackTrace(e); } }