registration

This commit is contained in:
User
2025-02-02 16:08:03 +03:00
parent 7f6495eb4d
commit 78afbaed71
6334 changed files with 196774 additions and 165754 deletions

View File

@@ -1,8 +1,6 @@
"use strict";
exports.formatDistanceToNow = formatDistanceToNow;
var _index = require("./constructNow.js");
import { constructNow } from "./constructNow.js";
var _index2 = require("./formatDistance.js");
import { formatDistance } from "./formatDistance.js";
/**
* The {@link formatDistanceToNow} function options.
@@ -46,8 +44,6 @@ var _index2 = require("./formatDistance.js");
* | 40 secs ... 60 secs | less than a minute |
* | 60 secs ... 90 secs | 1 minute |
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The given date
* @param options - The object with options
*
@@ -91,10 +87,9 @@ var _index2 = require("./formatDistance.js");
* )
* //=> 'pli ol 1 jaro'
*/
function formatDistanceToNow(date, options) {
return (0, _index2.formatDistance)(
date,
(0, _index.constructNow)(date),
options,
);
export function formatDistanceToNow(date, options) {
return formatDistance(date, constructNow(date), options);
}
// Fallback for modularized imports:
export default formatDistanceToNow;