MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / formatMoment

Function formatMoment

tests/test_code/js/moment/moment.js:516–526  ·  view source on GitHub ↗
(m, format)

Source from the content-addressed store, hash-verified

514
515 // format date using native date object
516 function formatMoment(m, format) {
517 if (!m.isValid()) {
518 return m.localeData().invalidDate();
519 }
520
521 format = expandFormat(format, m.localeData());
522 formatFunctions[format] =
523 formatFunctions[format] || makeFormatFunction(format);
524
525 return formatFunctions[format](m);
526 }
527
528 function expandFormat(format, locale) {
529 var i = 5;

Callers 2

toISOStringFunction · 0.85
formatFunction · 0.85

Calls 2

expandFormatFunction · 0.85
makeFormatFunctionFunction · 0.85

Tested by

no test coverage detected