C# Класс WebApplications.Utilities.TimeHelpers

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
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

Свойство Тип Описание
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

Открытые методы

Метод Описание
IsZero ( [ period ) : bool

Determines whether the specified period is zero.

SetDateTimeZoneProvider ( string path = null ) : void

Sets the DateTimeZoneProvider to the time zone database given.

Приватные методы

Метод Описание
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

Описание методов

IsZero() публичный статический Метод

Determines whether the specified period is zero.
public static IsZero ( [ period ) : bool
period [ The period.
Результат bool

SetDateTimeZoneProvider() публичный статический Метод

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.
Результат void

Описание свойств

FileTimeEpoch публичное статическое свойство

The file time epoch, 12:00 A.M. January 1, 1601.
public static Instant FileTimeEpoch
Результат Instant

InfiniteDuration публичное статическое свойство

A constant used to specify an infinite waiting period, for methods that accept a Duration parameter.
public static Duration,System InfiniteDuration
Результат System.Duration

MaxDuration публичное статическое свойство

A constant used to specify the maximum duration, for methods that accept a Duration parameter.
public static Duration,System MaxDuration
Результат System.Duration

MaxLocalDate публичное статическое свойство

A constant used to specify the maximum local date, for methods that accept a LocalDate parameter.
public static LocalDate MaxLocalDate
Результат LocalDate

MaxLocalDateTime публичное статическое свойство

A constant used to specify the maximum local date time, for methods that accept a LocalDateTime parameter.
public static LocalDateTime MaxLocalDateTime
Результат LocalDateTime

MaxLocalTime публичное статическое свойство

A constant used to specify the maximum local time, for methods that accept a LocalTime parameter.
public static LocalTime MaxLocalTime
Результат LocalTime

MinDuration публичное статическое свойство

A constant used to specify the minimum duration, for methods that accept a Duration parameter.
public static Duration,System MinDuration
Результат System.Duration

MinLocalDate публичное статическое свойство

A constant used to specify the minimum local date, for methods that accept a LocalDate parameter.
public static LocalDate MinLocalDate
Результат LocalDate

MinLocalDateTime публичное статическое свойство

A constant used to specify the minimum local date time, for methods that accept a LocalDateTime parameter.
public static LocalDateTime MinLocalDateTime
Результат LocalDateTime

MinLocalTime публичное статическое свойство

A constant used to specify the minimum local time, for methods that accept a LocalTime parameter.
public static LocalTime MinLocalTime
Результат LocalTime

OneHour публичное статическое свойство

The one hour Duration.
public static Duration,System OneHour
Результат System.Duration

OneMillisecond публичное статическое свойство

The one millisecond Duration.
public static Duration,System OneMillisecond
Результат System.Duration

OneMillisecondPeriod публичное статическое свойство

The one millisecond Duration.
public static Period OneMillisecondPeriod
Результат Period

OneMinute публичное статическое свойство

The one minute Duration.
public static Duration,System OneMinute
Результат System.Duration

OneSecond публичное статическое свойство

The one second Duration.
public static Duration,System OneSecond
Результат System.Duration

OneStandardDay публичное статическое свойство

The one standard day Duration.
public static Duration,System OneStandardDay
Результат System.Duration

OneStandardWeek публичное статическое свойство

The one standard week Duration.
public static Duration,System OneStandardWeek
Результат System.Duration

OneTick публичное статическое свойство

The one tick Duration.
public static Duration,System OneTick
Результат System.Duration

OneTickPeriod публичное статическое свойство

The one tick Period.
public static Period OneTickPeriod
Результат Period