MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fx_Date_parse

Function fx_Date_parse

xs/sources/xsDate.c:280–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void fx_Date_parse(txMachine* the)
281{
282 #define mxDayCount 7
283 static const char* const gxDays[mxDayCount] ICACHE_RODATA_ATTR = {
284 "monday",
285 "tuesday",
286 "wednesday",
287 "thursday",
288 "friday",
289 "saturday",
290 "sunday"
291 };
292 #define mxMonthCount 12
293 static const char* const gxMonths[mxMonthCount] ICACHE_RODATA_ATTR = {
294 "january",
295 "february",
296 "march",
297 "april",
298 "may",
299 "june",
300 "july",
301 "august",
302 "september",
303 "october",
304 "november",
305 "december"
306 };
307 #define mxZoneCount 11
308 static const char* const gxZones[mxZoneCount] ICACHE_RODATA_ATTR = {
309 "gmt", "ut", "utc",
310 "est", "edt",
311 "cst", "cdt",
312 "mst", "mdt",
313 "pst", "pdt"
314 };
315 static const int gxDeltas[mxZoneCount] ICACHE_XS6RO2_ATTR = {
316 0, 0, 0,
317 -5, -4,
318 -6, -5,
319 -7, -6,
320 -8, -7
321 };
322
323 txString aString;
324 txBoolean overflow = 0;
325 txDateTime dt;
326 txString p;
327 txString q;
328 txByte c;
329 char buffer[10]; /* base type should be the same as txString */
330 txInteger aComment;
331 txInteger aDelta;
332 txInteger aValue;
333 txSize aLength;
334 txInteger i;
335 txInteger yearSign = 1;
336
337 if (mxArgc < 1)

Callers

nothing calls this directly

Calls 4

fxToStringFunction · 0.85
fx_Date_parse_numberFunction · 0.85
fx_Date_parse_fractionFunction · 0.85
fxDateMergeFunction · 0.85

Tested by

no test coverage detected