@ejfdelgado/ejflab-common 1.13.2 → 1.13.4
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/package.json +1 -1
- package/src/MyDates.js +3 -4
- package/src/MyDatesFront.js +4 -5
package/package.json
CHANGED
package/src/MyDates.js
CHANGED
|
@@ -138,16 +138,15 @@ class MyDates {
|
|
|
138
138
|
}
|
|
139
139
|
// MyDates.getDefaults(args)
|
|
140
140
|
static getDefaults(args, currentYear, nextYears, myDefault = "") {
|
|
141
|
-
console.log(JSON.stringify(args, null, 4));
|
|
142
141
|
if (args instanceof Array) {
|
|
143
|
-
if (args.
|
|
142
|
+
if (args.length == 1) {
|
|
144
143
|
currentYear = args[0];
|
|
145
144
|
nextYears = args[0];
|
|
146
|
-
} else if (args.
|
|
145
|
+
} else if (args.length == 2) {
|
|
147
146
|
currentYear = args[0];
|
|
148
147
|
nextYears = args[1];
|
|
149
148
|
}
|
|
150
|
-
if (args.
|
|
149
|
+
if (args.length >= 3) {
|
|
151
150
|
myDefault = args[2];
|
|
152
151
|
}
|
|
153
152
|
}
|
package/src/MyDatesFront.js
CHANGED
|
@@ -13,17 +13,16 @@ class MyDatesFront extends MyDates {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
static formatDate(now, ...args) {
|
|
16
|
-
return MyDates.formatDateBasic(dateformat.default, now, args);
|
|
16
|
+
return MyDates.formatDateBasic(dateformat.default, now, ...args);
|
|
17
17
|
}
|
|
18
18
|
static formatDateCompleto(now, ...args) {
|
|
19
|
-
|
|
20
|
-
return MyDates.formatDateCompletoBasic(dateformat.default, now, args);
|
|
19
|
+
return MyDates.formatDateCompletoBasic(dateformat.default, now, ...args);
|
|
21
20
|
}
|
|
22
21
|
static formatDateSimple(now, ...args) {
|
|
23
|
-
return MyDates.formatDateSimpleBasic(dateformat.default, now, args);
|
|
22
|
+
return MyDates.formatDateSimpleBasic(dateformat.default, now, ...args);
|
|
24
23
|
}
|
|
25
24
|
static formatTime(now, ...args) {
|
|
26
|
-
return MyDates.formatTimeBasic(dateformat.default, now, args);
|
|
25
|
+
return MyDates.formatTimeBasic(dateformat.default, now, ...args);
|
|
27
26
|
}
|
|
28
27
|
static getServerTime() {
|
|
29
28
|
return new Date().getTime() - this.timeDifference;
|