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

Function isCalendarSpec

tests/test_code/js/moment/moment.js:3686–3706  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

3684 }
3685
3686 function isCalendarSpec(input) {
3687 var objectTest = isObject(input) && !isObjectEmpty(input),
3688 propertyTest = false,
3689 properties = [
3690 'sameDay',
3691 'nextDay',
3692 'lastDay',
3693 'nextWeek',
3694 'lastWeek',
3695 'sameElse',
3696 ],
3697 i,
3698 property;
3699
3700 for (i = 0; i < properties.length; i += 1) {
3701 property = properties[i];
3702 propertyTest = propertyTest || hasOwnProp(input, property);
3703 }
3704
3705 return objectTest && propertyTest;
3706 }
3707
3708 function getCalendarFormat(myMoment, now) {
3709 var diff = myMoment.diff(now, 'days', true);

Callers 1

calendar$1Function · 0.85

Calls 3

isObjectFunction · 0.85
isObjectEmptyFunction · 0.85
hasOwnPropFunction · 0.85

Tested by

no test coverage detected