MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / appendTime

Function appendTime

plugins/plugin_utils/plugin_utils.cpp:79–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77//Date: Mon, 23 Jun 2008 17:50:22 GMT
78
79void appendTime(std::string& text, bz_Time* ts, const char* _timezone) {
80 switch (ts->dayofweek) {
81 case 1:
82 text += "Mon";
83 break;
84 case 2:
85 text += "Tue";
86 break;
87 case 3:
88 text += "Wed";
89 break;
90 case 4:
91 text += "Thu";
92 break;
93 case 5:
94 text += "Fri";
95 break;
96 case 6:
97 text += "Sat";
98 break;
99 case 0:
100 text += "Sun";
101 break;
102 }
103
104 text += format(", %d ", ts->day);
105
106 switch (ts->month) {
107 case 0:
108 text += "Jan";
109 break;
110 case 1:
111 text += "Feb";
112 break;
113 case 2:
114 text += "Mar";
115 break;
116 case 3:
117 text += "Apr";
118 break;
119 case 4:
120 text += "May";
121 break;
122 case 5:
123 text += "Jun";
124 break;
125 case 6:
126 text += "Jul";
127 break;
128 case 7:
129 text += "Aug";
130 break;
131 case 8:
132 text += "Sep";
133 break;
134 case 9:
135 text += "Oct";
136 break;

Callers 1

printTimeFunction · 0.85

Calls 1

formatFunction · 0.70

Tested by

no test coverage detected