13693261870
2022-09-16 354b3dbfbffb3df45212a2a44dbbf48b4acc2594
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 to (time, withoutSuffix) {
    if (!this.isValid()) {
        return this.localeData().invalidDate();
    }
    return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
}
 
export function toNow (withoutSuffix) {
    return this.to(createLocal(), withoutSuffix);
}