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

◆ AdjustHour()

static bool System.DateTimeParse.AdjustHour ( ref int hour,
TM timeMark )
inlinestaticprivate

Definition at line 1889 of file DateTimeParse.cs.

1890 {
1891 switch (timeMark)
1892 {
1893 case TM.AM:
1894 if (hour < 0 || hour > 12)
1895 {
1896 return false;
1897 }
1898 hour = ((hour != 12) ? hour : 0);
1899 break;
1900 default:
1901 if (hour < 0 || hour > 23)
1902 {
1903 return false;
1904 }
1905 if (hour < 12)
1906 {
1907 hour += 12;
1908 }
1909 break;
1910 case TM.NotSet:
1911 break;
1912 }
1913 return true;
1914 }

Referenced by System.DateTimeParse.TryParse().