TimeConstants Class

Provides constants for typical "magic numbers" used when working with times or time intervals.

public static class TimeConstants

Constants

NameDescription
DaysPerWeekGets the number of days in a week.
HoursPerDayGets the number of hours in a day.
HoursPerWeekGets the number of hours in a week.
MillisecondsPerDayGets the number of milliseconds in a day.
MillisecondsPerHourGets the number of milliseconds in an hour.
MillisecondsPerMinuteGets the number of milliseconds in a minute.
MillisecondsPerSecondGets the number of milliseconds in a second.
MillisecondsPerWeekGets the number of milliseconds in a week.
MinutesPerDayGets the number of minutes in a day.
MinutesPerHourGets the number of minutes in an hour.
MinutesPerWeekGets the number of minutes in a week.
SecondsPerDayGets the number of seconds in a day.
SecondsPerHourGets the number of seconds in an hour.
SecondsPerMinuteGets the number of seconds in a minute.
SecondsPerWeekGets the number of seconds in a week.
TicksPerDayGets the number of ticks in a day.
TicksPerHourGets the number of ticks in an hour.
TicksPerMillisecondGets the number of ticks in a millisecond.
TicksPerMinuteGets the number of ticks in a minute.
TicksPerSecondGets the number of ticks in a second.
TicksPerWeekGets the number of ticks in a week.

DaysPerWeek

Gets the number of days in a week.

public const int DaysPerWeek = 7

HoursPerDay

Gets the number of hours in a day.

public const int HoursPerDay = 24

HoursPerWeek

Gets the number of hours in a week.

public const int HoursPerWeek = 168

MillisecondsPerDay

Gets the number of milliseconds in a day.

public const int MillisecondsPerDay = 86400000

MillisecondsPerHour

Gets the number of milliseconds in an hour.

public const int MillisecondsPerHour = 3600000

MillisecondsPerMinute

Gets the number of milliseconds in a minute.

public const int MillisecondsPerMinute = 60000

MillisecondsPerSecond

Gets the number of milliseconds in a second.

public const int MillisecondsPerSecond = 1000

MillisecondsPerWeek

Gets the number of milliseconds in a week.

public const int MillisecondsPerWeek = 604800000

MinutesPerDay

Gets the number of minutes in a day.

public const int MinutesPerDay = 1440

MinutesPerHour

Gets the number of minutes in an hour.

public const int MinutesPerHour = 60

MinutesPerWeek

Gets the number of minutes in a week.

public const int MinutesPerWeek = 10080

SecondsPerDay

Gets the number of seconds in a day.

public const int SecondsPerDay = 86400

SecondsPerHour

Gets the number of seconds in an hour.

public const int SecondsPerHour = 3600

SecondsPerMinute

Gets the number of seconds in a minute.

public const int SecondsPerMinute = 60

SecondsPerWeek

Gets the number of seconds in a week.

public const int SecondsPerWeek = 604800

TicksPerDay

Gets the number of ticks in a day.

public const long TicksPerDay = 864000000000L

TicksPerHour

Gets the number of ticks in an hour.

public const long TicksPerHour = 36000000000L

TicksPerMillisecond

Gets the number of ticks in a millisecond.

public const long TicksPerMillisecond = 10000L

TicksPerMinute

Gets the number of ticks in a minute.

public const long TicksPerMinute = 600000000L

TicksPerSecond

Gets the number of ticks in a second.

public const long TicksPerSecond = 10000000L

TicksPerWeek

Gets the number of ticks in a week.

public const long TicksPerWeek = 6048000000000L