text: import{createDuration as t}from"../duration/create.js";import{createLocal as o}from"../create/local.js";import{isMoment as i}from"./constructor.js";export function to(r,a){return this.isValid()&&(i(r)&&r.isValid()||o(r).isValid())?t({from:this,to:r}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}export function toNow(t){return this.to(o(),t)}