@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.
- package/dist/utils/validate-day.js +11 -12
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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(
|
|
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;
|