public static string Before(this string s, string word) { return s.Before(word, false); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }