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

Function fx_Date_UTC

xs/sources/xsDate.c:607–620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607void fx_Date_UTC(txMachine* the)
608{
609 txInteger c = mxArgc;
610 txDateTime dt;
611 dt.year = (c > 0) ? fxDateFullYear(the, mxArgv(0)) : C_NAN;
612 dt.month = (c > 1) ? fxToNumber(the, mxArgv(1)) : 0;
613 dt.date = (c > 2) ? fxToNumber(the, mxArgv(2)) : 1;
614 dt.hours = (c > 3) ? fxToNumber(the, mxArgv(3)) : 0;
615 dt.minutes = (c > 4) ? fxToNumber(the, mxArgv(4)) : 0;
616 dt.seconds = (c > 5) ?fxToNumber(the, mxArgv(5)) : 0;
617 dt.milliseconds = (c > 6) ? fxToNumber(the, mxArgv(6)) : 0;
618 mxResult->value.number = fxDateMerge(&dt, 1);
619 mxResult->kind = XS_NUMBER_KIND;
620}
621
622txBoolean fx_Date_prototype_get_aux(txMachine* the, txDateTime* dt, txBoolean utc, txSlot* slot)
623{

Callers

nothing calls this directly

Calls 3

fxDateFullYearFunction · 0.85
fxToNumberFunction · 0.85
fxDateMergeFunction · 0.85

Tested by

no test coverage detected