View Source
Class DateTimeExtensions
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public static class DateTimeExtensions
Methods
View Source
PeriodicMinutesFrom(DateTime, String)
Calculates the number of minutes from a date time, on a rolling daily basis (so if
date time is before the time, calculate onto next day)
Declaration
public static int PeriodicMinutesFrom(this DateTime fromDateTime, string scheduledTime)
Parameters
Type |
Name |
Description |
System.DateTime |
fromDateTime |
Date to start from
|
System.String |
scheduledTime |
Time to compare against (in Hmm form, e.g. 330, 2200)
|
Returns
Type |
Description |
System.Int32 |
|
View Source
ToIsoString(DateTime)
Returns the DateTime as an ISO formatted string that is globally expectable
Declaration
public static string ToIsoString(this DateTime dt)
Parameters
Type |
Name |
Description |
System.DateTime |
dt |
|
Returns
Type |
Description |
System.String |
|
View Source
TruncateTo(DateTime, DateTimeExtensions.DateTruncate)
Declaration
public static DateTime TruncateTo(this DateTime dt, DateTimeExtensions.DateTruncate truncateTo)
Parameters
Returns
Type |
Description |
System.DateTime |
|