(time, withoutSuffix)
| 3994 | } |
| 3995 | |
| 3996 | function to(time, withoutSuffix) { |
| 3997 | if ( |
| 3998 | this.isValid() && |
| 3999 | ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) |
| 4000 | ) { |
| 4001 | return createDuration({ from: this, to: time }) |
| 4002 | .locale(this.locale()) |
| 4003 | .humanize(!withoutSuffix); |
| 4004 | } else { |
| 4005 | return this.localeData().invalidDate(); |
| 4006 | } |
| 4007 | } |
| 4008 | |
| 4009 | function toNow(withoutSuffix) { |
| 4010 | return this.to(createLocal(), withoutSuffix); |
nothing calls this directly
no test coverage detected