1
13693261870
2022-09-16 06df9667ad1465622bf0e423dc3840ef9f93c725
1
2
3
4
5
6
7
8
9
10
11
12
13
import { createDuration } from '../duration/create';
import { createLocal } from '../create/local';
 
export function from (time, withoutSuffix) {
    if (!this.isValid()) {
        return this.localeData().invalidDate();
    }
    return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
}
 
export function fromNow (withoutSuffix) {
    return this.from(createLocal(), withoutSuffix);
}