@fhss-web-team/fuzzy-dates 1.2.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -36
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -2
- package/dist/src/collation/collationKey.d.ts +2 -0
- package/dist/src/collation/collationKey.js +44 -0
- package/dist/{fuzzyDate → src}/fuzzyDate.d.ts +85 -69
- package/dist/src/fuzzyDate.js +238 -0
- package/dist/src/gedcomX/toGedcomX.js +28 -0
- package/dist/src/helpers/constants.d.ts +2 -0
- package/dist/src/helpers/constants.js +2 -0
- package/dist/src/helpers/types.d.ts +12 -0
- package/dist/src/helpers/types.js +3 -0
- package/dist/src/normalize/normalize.js +51 -0
- package/dist/src/parse/index.d.ts +47 -0
- package/dist/src/parse/index.js +41 -0
- package/dist/src/parse/modifiers.d.ts +182 -0
- package/dist/src/parse/modifiers.js +62 -0
- package/dist/{fuzzyDate/parse/inputDateFormats.d.ts → src/parse/simpleDate/formats.d.ts} +33 -50
- package/dist/{fuzzyDate/parse/inputDateFormats.js → src/parse/simpleDate/formats.js} +69 -88
- package/dist/src/parse/simpleDate/helpers.d.ts +21 -0
- package/dist/src/parse/simpleDate/helpers.js +58 -0
- package/dist/src/parse/simpleDate/parse.d.ts +31 -0
- package/dist/{fuzzyDate/parse/stringToDate.js → src/parse/simpleDate/parse.js} +4 -5
- package/package.json +1 -11
- package/dist/fuzzyDate/collate/collate.d.ts +0 -2
- package/dist/fuzzyDate/collate/collate.js +0 -15
- package/dist/fuzzyDate/fuzzyDate.js +0 -246
- package/dist/fuzzyDate/fuzzyDate.spec.d.ts +0 -1
- package/dist/fuzzyDate/fuzzyDate.spec.js +0 -158
- package/dist/fuzzyDate/gedcomX/toGedcomX.js +0 -31
- package/dist/fuzzyDate/helpers/constants.d.ts +0 -4
- package/dist/fuzzyDate/helpers/constants.js +0 -20
- package/dist/fuzzyDate/helpers/schemas.d.ts +0 -36
- package/dist/fuzzyDate/helpers/schemas.js +0 -12
- package/dist/fuzzyDate/helpers/types.d.ts +0 -16
- package/dist/fuzzyDate/helpers/types.js +0 -1
- package/dist/fuzzyDate/normalize/normalize.js +0 -47
- package/dist/fuzzyDate/parse/index.d.ts +0 -178
- package/dist/fuzzyDate/parse/index.js +0 -92
- package/dist/fuzzyDate/parse/modifiers.d.ts +0 -231
- package/dist/fuzzyDate/parse/modifiers.js +0 -185
- package/dist/fuzzyDate/parse/stringToDate.d.ts +0 -38
- /package/dist/{fuzzyDate → src}/gedcomX/toGedcomX.d.ts +0 -0
- /package/dist/{fuzzyDate → src}/helpers/result.d.ts +0 -0
- /package/dist/{fuzzyDate → src}/helpers/result.js +0 -0
- /package/dist/{fuzzyDate → src}/normalize/normalize.d.ts +0 -0
- /package/dist/{fuzzyDate/helpers → src/parse/simpleDate}/maps.d.ts +0 -0
- /package/dist/{fuzzyDate/helpers → src/parse/simpleDate}/maps.js +0 -0
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export declare function stringToDate(dateInput: string): {
|
|
2
|
-
ok: false;
|
|
3
|
-
error: "Year is required.";
|
|
4
|
-
} | {
|
|
5
|
-
ok: false;
|
|
6
|
-
error: "Unknown month.";
|
|
7
|
-
} | {
|
|
8
|
-
ok: false;
|
|
9
|
-
error: "Unknown date format.";
|
|
10
|
-
} | {
|
|
11
|
-
ok: true;
|
|
12
|
-
value: {
|
|
13
|
-
readonly format: "YYYY";
|
|
14
|
-
readonly minDate: Date;
|
|
15
|
-
readonly maxDate: Date;
|
|
16
|
-
};
|
|
17
|
-
} | {
|
|
18
|
-
ok: true;
|
|
19
|
-
value: {
|
|
20
|
-
readonly format: "SEASON_YYYY" | "MMMM_YYYY";
|
|
21
|
-
readonly minDate: Date;
|
|
22
|
-
readonly maxDate: Date;
|
|
23
|
-
};
|
|
24
|
-
} | {
|
|
25
|
-
ok: true;
|
|
26
|
-
value: {
|
|
27
|
-
readonly format: "D_MMMM_YYYY";
|
|
28
|
-
readonly minDate: Date;
|
|
29
|
-
readonly maxDate: Date;
|
|
30
|
-
};
|
|
31
|
-
} | {
|
|
32
|
-
ok: true;
|
|
33
|
-
value: {
|
|
34
|
-
readonly format: "YYYYs";
|
|
35
|
-
readonly minDate: Date;
|
|
36
|
-
readonly maxDate: Date;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|