(time, withoutSuffix)
| 3977 | } |
| 3978 | |
| 3979 | function from(time, withoutSuffix) { |
| 3980 | if ( |
| 3981 | this.isValid() && |
| 3982 | ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) |
| 3983 | ) { |
| 3984 | return createDuration({ to: this, from: time }) |
| 3985 | .locale(this.locale()) |
| 3986 | .humanize(!withoutSuffix); |
| 3987 | } else { |
| 3988 | return this.localeData().invalidDate(); |
| 3989 | } |
| 3990 | } |
| 3991 | |
| 3992 | function fromNow(withoutSuffix) { |
| 3993 | return this.from(createLocal(), withoutSuffix); |
nothing calls this directly
no test coverage detected