@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.
Files changed (48) hide show
  1. package/README.md +99 -36
  2. package/dist/index.d.ts +1 -3
  3. package/dist/index.js +1 -2
  4. package/dist/src/collation/collationKey.d.ts +2 -0
  5. package/dist/src/collation/collationKey.js +44 -0
  6. package/dist/{fuzzyDate → src}/fuzzyDate.d.ts +85 -69
  7. package/dist/src/fuzzyDate.js +238 -0
  8. package/dist/src/gedcomX/toGedcomX.js +28 -0
  9. package/dist/src/helpers/constants.d.ts +2 -0
  10. package/dist/src/helpers/constants.js +2 -0
  11. package/dist/src/helpers/types.d.ts +12 -0
  12. package/dist/src/helpers/types.js +3 -0
  13. package/dist/src/normalize/normalize.js +51 -0
  14. package/dist/src/parse/index.d.ts +47 -0
  15. package/dist/src/parse/index.js +41 -0
  16. package/dist/src/parse/modifiers.d.ts +182 -0
  17. package/dist/src/parse/modifiers.js +62 -0
  18. package/dist/{fuzzyDate/parse/inputDateFormats.d.ts → src/parse/simpleDate/formats.d.ts} +33 -50
  19. package/dist/{fuzzyDate/parse/inputDateFormats.js → src/parse/simpleDate/formats.js} +69 -88
  20. package/dist/src/parse/simpleDate/helpers.d.ts +21 -0
  21. package/dist/src/parse/simpleDate/helpers.js +58 -0
  22. package/dist/src/parse/simpleDate/parse.d.ts +31 -0
  23. package/dist/{fuzzyDate/parse/stringToDate.js → src/parse/simpleDate/parse.js} +4 -5
  24. package/package.json +1 -11
  25. package/dist/fuzzyDate/collate/collate.d.ts +0 -2
  26. package/dist/fuzzyDate/collate/collate.js +0 -15
  27. package/dist/fuzzyDate/fuzzyDate.js +0 -246
  28. package/dist/fuzzyDate/fuzzyDate.spec.d.ts +0 -1
  29. package/dist/fuzzyDate/fuzzyDate.spec.js +0 -158
  30. package/dist/fuzzyDate/gedcomX/toGedcomX.js +0 -31
  31. package/dist/fuzzyDate/helpers/constants.d.ts +0 -4
  32. package/dist/fuzzyDate/helpers/constants.js +0 -20
  33. package/dist/fuzzyDate/helpers/schemas.d.ts +0 -36
  34. package/dist/fuzzyDate/helpers/schemas.js +0 -12
  35. package/dist/fuzzyDate/helpers/types.d.ts +0 -16
  36. package/dist/fuzzyDate/helpers/types.js +0 -1
  37. package/dist/fuzzyDate/normalize/normalize.js +0 -47
  38. package/dist/fuzzyDate/parse/index.d.ts +0 -178
  39. package/dist/fuzzyDate/parse/index.js +0 -92
  40. package/dist/fuzzyDate/parse/modifiers.d.ts +0 -231
  41. package/dist/fuzzyDate/parse/modifiers.js +0 -185
  42. package/dist/fuzzyDate/parse/stringToDate.d.ts +0 -38
  43. /package/dist/{fuzzyDate → src}/gedcomX/toGedcomX.d.ts +0 -0
  44. /package/dist/{fuzzyDate → src}/helpers/result.d.ts +0 -0
  45. /package/dist/{fuzzyDate → src}/helpers/result.js +0 -0
  46. /package/dist/{fuzzyDate → src}/normalize/normalize.d.ts +0 -0
  47. /package/dist/{fuzzyDate/helpers → src/parse/simpleDate}/maps.d.ts +0 -0
  48. /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