@carlosdiazz/lottodiz-shared 1.4.5 → 1.4.7

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.
@@ -17,22 +17,21 @@ const validateDate = (date_verify, arrs) => {
17
17
  throw new Error("arrs is different");
18
18
  const date = arrs[0];
19
19
  // Formatos en los dos idiomas
20
- const format_dates = [
21
- //Loterias Dominicanas
22
- dayjs_1.default.utc(date_verify).format("DD-MM").toUpperCase(),
23
- ];
24
- // Español
20
+ const format_dates = [];
21
+ //! Español
25
22
  dayjs_1.default.locale("es");
26
- format_dates.push(
23
+ //Loterias Dominicanas
24
+ format_dates.push(dayjs_1.default.utc(date_verify).format("DD-MM").toUpperCase());
27
25
  //En Lote
28
- dayjs_1.default.utc(date_verify).format("dddd D [de] MMMM, YYYY").toUpperCase());
29
- // Ingles
26
+ format_dates.push(dayjs_1.default.utc(date_verify).format("dddd D [de] MMMM, YYYY").toUpperCase());
27
+ //! Ingles
30
28
  dayjs_1.default.locale("en");
31
- format_dates.push(
32
- //Prueba Fecha Ingles
33
- dayjs_1.default.utc(date_verify).format("dddd, MMMM D, YYYY").toUpperCase());
29
+ //Test
30
+ format_dates.push(dayjs_1.default.utc(date_verify).format("dddd, MMMM D, YYYY").toUpperCase());
31
+ // Lottery Usa
32
+ format_dates.push(dayjs_1.default.utc(date_verify).locale("en").format("MMM D, YYYY").toUpperCase());
34
33
  const is_valid = format_dates.includes(date);
35
34
  if (!is_valid)
36
- throw new Error("This is not the date to look for");
35
+ throw new Error(`This is not the date to look for => Date: ${date} format_dates: ${format_dates.join(" - ")} `);
37
36
  };
38
37
  exports.validateDate = validateDate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carlosdiazz/lottodiz-shared",
3
- "version": "1.4.5",
3
+ "version": "1.4.7",
4
4
  "description": "Shared Dtos, models, constants and utils",
5
5
  "main": "dist/index.js",
6
6
  "private": false,