1 import { createDuration } from '../duration/create';
2 import { createLocal } from '../create/local';
3 import { isMoment } from '../moment/constructor';
5 export function from (time, withoutSuffix) {
7 ((isMoment(time) && time.isValid()) ||
8 createLocal(time).isValid())) {
9 return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
11 return this.localeData().invalidDate();
15 export function fromNow (withoutSuffix) {
16 return this.from(createLocal(), withoutSuffix);