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

Function expandFormat

tests/test_code/js/moment/moment.js:528–546  ·  view source on GitHub ↗
(format, locale)

Source from the content-addressed store, hash-verified

526 }
527
528 function expandFormat(format, locale) {
529 var i = 5;
530
531 function replaceLongDateFormatTokens(input) {
532 return locale.longDateFormat(input) || input;
533 }
534
535 localFormattingTokens.lastIndex = 0;
536 while (i >= 0 && localFormattingTokens.test(format)) {
537 format = format.replace(
538 localFormattingTokens,
539 replaceLongDateFormatTokens
540 );
541 localFormattingTokens.lastIndex = 0;
542 i -= 1;
543 }
544
545 return format;
546 }
547
548 var defaultLongDateFormat = {
549 LTS: 'h:mm:ss A',

Callers 2

formatMomentFunction · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected