Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TimeToTicks()

static long System.Globalization.Calendar.TimeToTicks ( int hour,
int minute,
int second,
int millisecond )
inlinestaticpackageinherited

Definition at line 365 of file Calendar.cs.

366 {
367 if (hour < 0 || hour >= 24 || minute < 0 || minute >= 60 || second < 0 || second >= 60)
368 {
369 throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond);
370 }
371 if (millisecond < 0 || millisecond >= 1000)
372 {
373 throw new ArgumentOutOfRangeException("millisecond", millisecond, SR.Format(SR.ArgumentOutOfRange_Range, 0, 999));
374 }
375 return InternalGlobalizationHelper.TimeToTicks(hour, minute, second) + (long)millisecond * 10000L;
376 }

References System.SR.ArgumentOutOfRange_BadHourMinuteSecond, System.SR.ArgumentOutOfRange_Range, System.SR.Format(), System.L, and System.Globalization.InternalGlobalizationHelper.TimeToTicks().

Referenced by System.Globalization.HebrewCalendar.HebrewToGregorian(), System.Globalization.HijriCalendar.ToDateTime(), System.Globalization.PersianCalendar.ToDateTime(), and System.Globalization.UmAlQuraCalendar.ToDateTime().