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

◆ DateToTicks()

static ulong System.DateTime.DateToTicks ( int year,
int month,
int day )
inlinestaticprivate

Definition at line 580 of file DateTime.cs.

581 {
582 if (year < 1 || year > 9999 || month < 1 || month > 12 || day < 1)
583 {
584 ThrowHelper.ThrowArgumentOutOfRange_BadYearMonthDay();
585 }
587 if ((uint)day > array[month] - array[month - 1])
588 {
589 ThrowHelper.ThrowArgumentOutOfRange_BadYearMonthDay();
590 }
591 uint num = (uint)((int)(DaysToYear((uint)year) + array[month - 1]) + day - 1);
592 return (ulong)num * 864000000000uL;
593 }
static readonly uint[] s_daysToMonth366
Definition DateTime.cs:29
static bool IsLeapYear(int year)
Definition DateTime.cs:898
static uint DaysToYear(uint year)
Definition DateTime.cs:596
static readonly uint[] s_daysToMonth365
Definition DateTime.cs:23

References System.array, System.DateTime.DaysToYear(), System.Runtime.Serialization.Dictionary, System.DateTime.IsLeapYear(), System.DateTime.s_daysToMonth365, System.DateTime.s_daysToMonth366, System.ThrowHelper.ThrowArgumentOutOfRange_BadYearMonthDay(), and System.year.

Referenced by System.DateTime.DateTime(), System.DateTime.DateTime(), System.DateTime.DateTime(), System.DateTime.DateTime(), and System.DateTime.DateTime().