/// <summary> /// Create a new filter to select commits before a given date/time. /// </summary> /// <param name="ts">the point in time to cut on.</param> /// <returns> /// a new filter to select commits on or before <paramref name="ts"/>. /// </returns> public static RevFilter Before(DateTime ts) { return new BeforeCommitTimeRevFilter(ts.ToMillisecondsSinceEpoch()); }
/// <summary> /// Create a new filter to select commits After a given date/time. /// </summary> /// <param name="ts">the point in time to cut on.</param> /// <returns> /// a new filter to select commits on or After <paramref name="ts"/>. /// </returns> public static RevFilter After(DateTime ts) { return new AfterCommitTimeRevFilter(ts.ToMillisecondsSinceEpoch()); }
/// <summary> /// Create a new filter to select commits after or equal a given date/time <code>since</code> /// and before or equal a given date/time <code>until</code>. /// </summary> /// <param name="since"> the point in time to cut on.</param> /// <param name="until"> the point in time to cut off.</param> /// <returns>a new filter to select commits between the given date/times.</returns> public static RevFilter Between(DateTime since, DateTime until) { return new BetweenCommitTimeRevFilter(since.ToMillisecondsSinceEpoch(), until.ToMillisecondsSinceEpoch()); }
/// <summary> /// Construct a PersonIdent from simple data /// </summary> /// <param name="name"></param> /// <param name="emailAddress"></param> /// <param name="when">Local date time in milliseconds (since Epoch).</param> /// <param name="tz">Time zone offset in minutes.</param> public PersonIdent(string name, string emailAddress, DateTime when, int tz) : this(name, emailAddress, when.ToMillisecondsSinceEpoch(), tz) { }
/// <summary> /// Copy a <seealso cref="PersonIdent"/>, but alter the clone's time stamp /// </summary> /// <param name="pi">Original <seealso cref="PersonIdent"/>.</param> /// <param name="when">Local date time in milliseconds (since Epoch).</param> public PersonIdent(PersonIdent pi, DateTime when) : this(pi.Name, pi.EmailAddress, when.ToMillisecondsSinceEpoch(), pi.tzOffset) { }
/// <summary> /// Construct a PersonIdent from simple data /// </summary> /// <param name="name"></param> /// <param name="emailAddress"></param> /// <param name="when">Local time stamp.</param> /// <param name="tz">Time zone.</param> public PersonIdent(string name, string emailAddress, DateTime when, TimeZoneInfo tz) : this(name, emailAddress, when.ToMillisecondsSinceEpoch(), (int)tz.GetUtcOffset(when).TotalMinutes) { }