1
lxl
2022-09-16 cb746cca26fa024018d7ce772ba6a96557ea768b
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);
}