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,7 +1,5 @@
"use strict";
exports.isMatch = isMatch;
var _index = require("./isValid.js");
var _index2 = require("./parse.js");
import { isValid } from "./isValid.js";
import { parse } from "./parse.js";
/**
* The {@link isMatch} function options.
@@ -193,7 +191,7 @@ var _index2 = require("./parse.js");
*
* `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
*
* `isMatch` will try to match both formatting and stand-alone units interchangably.
* `isMatch` will try to match both formatting and stand-alone units interchangeably.
*
* 2. Any sequence of the identical letters is a pattern, unless it is escaped by
* the single quote characters (see below).
@@ -242,7 +240,7 @@ var _index2 = require("./parse.js");
* 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.
* 7. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based
@@ -263,8 +261,6 @@ var _index2 = require("./parse.js");
*
* If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.
*
* @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 dateStr - The date string to verify
* @param format - The string of tokens
* @param options - An object with options.
@@ -293,8 +289,9 @@ var _index2 = require("./parse.js");
* })
* //=> true
*/
function isMatch(dateStr, formatStr, options) {
return (0, _index.isValid)(
(0, _index2.parse)(dateStr, formatStr, new Date(), options),
);
export function isMatch(dateStr, formatStr, options) {
return isValid(parse(dateStr, formatStr, new Date(), options));
}
// Fallback for modularized imports:
export default isMatch;