Skip to content

Instantly share code, notes, and snippets.

@kosorin
Created February 22, 2019 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kosorin/4d05690e8ce9d9ad6e520a3f4d1f2003 to your computer and use it in GitHub Desktop.
Save kosorin/4d05690e8ce9d9ad6e520a3f4d1f2003 to your computer and use it in GitHub Desktop.
public static class TimeConstants
{
public const int MillisecondsPerSecond = 1000;
public const int MillisecondsPerMinute = MillisecondsPerSecond * SecondsPerMinute;
public const int MillisecondsPerHour = MillisecondsPerMinute * MinutesPerHour;
public const int MillisecondsPerDay = MillisecondsPerHour * HoursPerDay;
public const int MillisecondsPerWeek = MillisecondsPerDay * DaysPerWeek;
public const int SecondsPerMinute = 60;
public const int SecondsPerHour = SecondsPerMinute * MinutesPerHour;
public const int SecondsPerDay = SecondsPerHour * HoursPerDay;
public const int SecondsPerWeek = SecondsPerDay * DaysPerWeek;
public const int MinutesPerHour = 60;
public const int MinutesPerDay = MinutesPerHour * HoursPerDay;
public const int MinutesPerWeek = MinutesPerDay * DaysPerWeek;
public const int HoursPerDay = 24;
public const int HoursPerWeek = HoursPerDay * DaysPerWeek;
public const int DaysPerWeek = 7;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment