コード例 #1
0
 public static string Before(this string s, string word)
 {
     return s.Before(word, false);
 }
コード例 #2
0
		/// <summary>
		/// Subtracts given <see cref="TimeSpan"/> from <paramref name="originalValue"/> <see cref="DateTime"/> and returns resulting <see cref="DateTime"/> in the past.
		/// </summary>
		public static DateTimeOffset Ago(this FluentTimeSpan from, DateTimeOffset originalValue)
		{
			return from.Before(originalValue);
		}
コード例 #3
0
 /// <summary>
 /// Subtracts given <see cref="TimeSpan"/> from <paramref name="originalValue"/> <see cref="DateTime"/> and returns resulting <see cref="DateTime"/> in the past.
 /// </summary>
 public static DateTime Ago(this TimeSpan from, DateTime originalValue)
 {
     return from.Before(originalValue);
 }
コード例 #4
0
		/// <summary>
        /// Subtracts given <see cref="FluentTimeSpan"/> from current date (<see cref="DateTimeOffset.Now"/>) and returns resulting <see cref="DateTime"/> in the past.
		/// </summary>
        public static DateTimeOffset Ago(this FluentTimeSpan from)
		{
            return from.Before(DateTimeOffset.Now);
		}
コード例 #5
0
 /// <summary>
 /// Subtracts given <see cref="TimeSpan"/> from current date (<see cref="DateTime.Now"/>) and returns resulting <see cref="DateTime"/> in the past.
 /// </summary>
 public static DateTime Ago(this TimeSpan from)
 {
     return from.Before(DateTime.Now);
 }