Toggle navigation
Hot Examples
ZH
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
C#
PHP
C#
Java
Go
C++
Python
JS
TS
搜索
Home
Aqueduct
Extensions
Dates
HoursAgo
Aqueduct.Extensions.Dates.HoursAgo C# (CSharp) Method
Dates Class Documentation
显示文件
Open project: aqueduct/Aqueduct.SitecoreLib
HoursAgo()
public
static
method
Returns a date in the past by hours.
public
static
HoursAgo
(
this
hours
) :
System.DateTime
hours
this
The hours.
return
System.DateTime
public static DateTime HoursAgo(this int hours) { return DateTime.Now.AddHours(-hours); }
Dates
CountWeekdays
CountWeekends
DaysAgo
DaysFromNow
Diff
DiffDays
DiffHours
DiffMinutes
FormatString
GetDateDayWithSuffix
GetFormattedMonthAndDay
GetSuffix
HoursAgo
HoursFromNow
IsDate
IsWeekDay
IsWeekEnd
MinutesAgo
MinutesFromNow
ReadableDiff
SecondsAgo
SecondsFromNow
TimeDiff