registration
This commit is contained in:
19
frontend/style/node_modules/date-fns/formatDistanceToNow.js
generated
vendored
19
frontend/style/node_modules/date-fns/formatDistanceToNow.js
generated
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user