C# Class WebApplications.Utilities.TimeHelpers

Mostrar archivo Open project: webappsuk/CoreLibraries

Public Properties

Property Type Description
FileTimeEpoch Instant
InfiniteDuration System.Duration
MaxDuration System.Duration
MaxLocalDate LocalDate
MaxLocalDateTime LocalDateTime
MaxLocalTime LocalTime
MinDuration System.Duration
MinLocalDate LocalDate
MinLocalDateTime LocalDateTime
MinLocalTime LocalTime
OneHour System.Duration
OneMillisecond System.Duration
OneMillisecondPeriod Period
OneMinute System.Duration
OneSecond System.Duration
OneStandardDay System.Duration
OneStandardWeek System.Duration
OneTick System.Duration
OneTickPeriod Period

Private Properties

Property Type Description
CeilingHour Instant
CeilingMinute Instant
CeilingSecond Instant
FloorHour Instant
FloorMinute Instant
FloorSecond Instant
Hours int
InstantFromFileTimeUtc Instant
IsNegative bool
IsNegative bool
IsPositive bool
IsPositive bool
LoadTzdb IDateTimeZoneProvider
Milliseconds int
Minutes int
OnActiveUtilityConfigurationChanged void
Seconds int
StandardDays int
StandardWeeks int
TimeHelpers NodaTime
TotalHours double
TotalMilliseconds double
TotalMinutes double
TotalSeconds double
TotalStandardDays double
TotalStandardWeeks double

Public Methods

Method Description
IsZero ( [ period ) : bool

Determines whether the specified period is zero.

SetDateTimeZoneProvider ( string path = null ) : void

Sets the DateTimeZoneProvider to the time zone database given.

Private Methods

Method Description
CeilingHour ( this instant ) : Instant
CeilingMinute ( this instant ) : Instant
CeilingSecond ( this instant ) : Instant
FloorHour ( this instant ) : Instant
FloorMinute ( this instant ) : Instant
FloorSecond ( this instant ) : Instant
Hours ( this duration ) : int
InstantFromFileTimeUtc ( long fileTimeTicks ) : Instant
IsNegative ( [ period, LocalDate local ) : bool
IsNegative ( [ period, LocalDateTime local ) : bool
IsPositive ( [ period, LocalDate local ) : bool
IsPositive ( [ period, LocalDateTime local ) : bool
LoadTzdb ( string path = null ) : IDateTimeZoneProvider
Milliseconds ( this duration ) : int
Minutes ( this duration ) : int
OnActiveUtilityConfigurationChanged ( [ sender, [ e ) : void

Called when the utility configuration changes. If the UtilityConfiguration.TimeZoneDB property changes, the database will be reloaded.

Seconds ( this duration ) : int
StandardDays ( this duration ) : int
StandardWeeks ( this duration ) : int
TimeHelpers ( ) : NodaTime

Initializes the TimeHelpers class.

TotalHours ( this duration ) : double
TotalMilliseconds ( this duration ) : double
TotalMinutes ( this duration ) : double
TotalSeconds ( this duration ) : double
TotalStandardDays ( this duration ) : double
TotalStandardWeeks ( this duration ) : double

Method Details

IsZero() public static method

Determines whether the specified period is zero.
public static IsZero ( [ period ) : bool
period [ The period.
return bool

SetDateTimeZoneProvider() public static method

Sets the DateTimeZoneProvider to the time zone database given.
public static SetDateTimeZoneProvider ( string path = null ) : void
path string The path of the database file to load, or to use the path in the configuration. /// If no path is given in the config, the default NodaTime will be used.
return void

Property Details

FileTimeEpoch public_oe static_oe property

The file time epoch, 12:00 A.M. January 1, 1601.
public static Instant FileTimeEpoch
return Instant

InfiniteDuration public_oe static_oe property

A constant used to specify an infinite waiting period, for methods that accept a Duration parameter.
public static Duration,System InfiniteDuration
return System.Duration

MaxDuration public_oe static_oe property

A constant used to specify the maximum duration, for methods that accept a Duration parameter.
public static Duration,System MaxDuration
return System.Duration

MaxLocalDate public_oe static_oe property

A constant used to specify the maximum local date, for methods that accept a LocalDate parameter.
public static LocalDate MaxLocalDate
return LocalDate

MaxLocalDateTime public_oe static_oe property

A constant used to specify the maximum local date time, for methods that accept a LocalDateTime parameter.
public static LocalDateTime MaxLocalDateTime
return LocalDateTime

MaxLocalTime public_oe static_oe property

A constant used to specify the maximum local time, for methods that accept a LocalTime parameter.
public static LocalTime MaxLocalTime
return LocalTime

MinDuration public_oe static_oe property

A constant used to specify the minimum duration, for methods that accept a Duration parameter.
public static Duration,System MinDuration
return System.Duration

MinLocalDate public_oe static_oe property

A constant used to specify the minimum local date, for methods that accept a LocalDate parameter.
public static LocalDate MinLocalDate
return LocalDate

MinLocalDateTime public_oe static_oe property

A constant used to specify the minimum local date time, for methods that accept a LocalDateTime parameter.
public static LocalDateTime MinLocalDateTime
return LocalDateTime

MinLocalTime public_oe static_oe property

A constant used to specify the minimum local time, for methods that accept a LocalTime parameter.
public static LocalTime MinLocalTime
return LocalTime

OneHour public_oe static_oe property

The one hour Duration.
public static Duration,System OneHour
return System.Duration

OneMillisecond public_oe static_oe property

The one millisecond Duration.
public static Duration,System OneMillisecond
return System.Duration

OneMillisecondPeriod public_oe static_oe property

The one millisecond Duration.
public static Period OneMillisecondPeriod
return Period

OneMinute public_oe static_oe property

The one minute Duration.
public static Duration,System OneMinute
return System.Duration

OneSecond public_oe static_oe property

The one second Duration.
public static Duration,System OneSecond
return System.Duration

OneStandardDay public_oe static_oe property

The one standard day Duration.
public static Duration,System OneStandardDay
return System.Duration

OneStandardWeek public_oe static_oe property

The one standard week Duration.
public static Duration,System OneStandardWeek
return System.Duration

OneTick public_oe static_oe property

The one tick Duration.
public static Duration,System OneTick
return System.Duration

OneTickPeriod public_oe static_oe property

The one tick Period.
public static Period OneTickPeriod
return Period