DayZ 1.24
Loading...
Searching...
No Matches
FullTimeData Class Reference

struct that keeps Time relevant information for future formatting More...

Private Member Functions

int m_Days int m_Hours int m_Minutes int m_Seconds string FormatedAsTimestamp ()
 
string FormatedWithZero ()
 
string FormatedNonZero ()
 

Detailed Description

struct that keeps Time relevant information for future formatting

Definition at line 4 of file TimeConversions.c.

Member Function Documentation

◆ FormatedAsTimestamp()

int m_Days int m_Hours int m_Minutes int m_Seconds string FullTimeData::FormatedAsTimestamp ( )
inlineprivate

Definition at line 11 of file TimeConversions.c.

12 {
13 m_Hours += m_Days * 24;
14
15 string h;
16 string m;
17 string s;
18
19 if (m_Hours < 10)
20 h = "0";
21
22 if (m_Minutes < 10)
23 m = "0";
24
25 if (m_Seconds < 10)
26 s = "0";
27
28 return string.Format("%1%2:%3%4:%5%6", h, m_Hours, m, m_Minutes, s, m_Seconds);
29 }

◆ FormatedNonZero()

string FullTimeData::FormatedNonZero ( )
inlineprivate

Definition at line 36 of file TimeConversions.c.

37 {
38 string message;
39
40 if (m_Days > 0)
41 message += string.Format("%1#STR_time_unit_abbrev_day_0 ", m_Days);
42 if (m_Hours > 0)
43 message += string.Format("%1#STR_time_unit_abbrev_hour_0 ", m_Hours);
44 if (m_Minutes > 0)
45 message += string.Format("%1#STR_time_unit_abbrev_minute_0 ", m_Minutes);
46
47 message += string.Format("%1#STR_time_unit_abbrev_second_0", m_Seconds);
48
49 return message;
50 }

◆ FormatedWithZero()

string FullTimeData::FormatedWithZero ( )
inlineprivate

Definition at line 31 of file TimeConversions.c.

32 {
33 return string.Format("%1#STR_time_unit_abbrev_day_0 %2#STR_time_unit_abbrev_hour_0 %3#STR_time_unit_abbrev_minute_0 %4#STR_time_unit_abbrev_second_0", m_Days, m_Hours, m_Minutes, m_Seconds);
34 }

References string::Format().


The documentation for this class was generated from the following file: