Aspectacular.RelativeTimeSpanExtensions.EndOf C# (CSharp) Méthode

EndOf() public static méthode

public static EndOf ( this dt, TimeUnits unit ) : System.DateTime
dt this
unit TimeUnits
Résultat System.DateTime
        public static DateTime EndOf(this DateTime dt, TimeUnits unit)
        {
            DateTime start = dt.StartOf(unit);
            DateTime next = start.Add(1, unit);
            DateTime end = next.PreviousMoment();
            return end;
        }

Same methods

RelativeTimeSpanExtensions::EndOf ( this dt, TimeUnits unit ) : DateTimeOffset