(myMoment, now)
| 3706 | } |
| 3707 | |
| 3708 | function getCalendarFormat(myMoment, now) { |
| 3709 | var diff = myMoment.diff(now, 'days', true); |
| 3710 | return diff < -6 |
| 3711 | ? 'sameElse' |
| 3712 | : diff < -1 |
| 3713 | ? 'lastWeek' |
| 3714 | : diff < 0 |
| 3715 | ? 'lastDay' |
| 3716 | : diff < 1 |
| 3717 | ? 'sameDay' |
| 3718 | : diff < 2 |
| 3719 | ? 'nextDay' |
| 3720 | : diff < 7 |
| 3721 | ? 'nextWeek' |
| 3722 | : 'sameElse'; |
| 3723 | } |
| 3724 | |
| 3725 | function calendar$1(time, formats) { |
| 3726 | // Support for single parameter, formats only overload to the calendar function |
nothing calls this directly
no outgoing calls
no test coverage detected