diff options
Diffstat (limited to 'library/moment/src/lib/moment/to.js')
-rw-r--r-- | library/moment/src/lib/moment/to.js | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/library/moment/src/lib/moment/to.js b/library/moment/src/lib/moment/to.js deleted file mode 100644 index d9eccfde7..000000000 --- a/library/moment/src/lib/moment/to.js +++ /dev/null @@ -1,13 +0,0 @@ -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); -} |