@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ejfdelgado/ejflab-common",
3
3
  "type": "commonjs",
4
- "version": "1.13.2",
4
+ "version": "1.13.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ejfdelgado/ejflab-common.git"
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.lenght == 1) {
142
+ if (args.length == 1) {
144
143
  currentYear = args[0];
145
144
  nextYears = args[0];
146
- } else if (args.lenght == 2) {
145
+ } else if (args.length == 2) {
147
146
  currentYear = args[0];
148
147
  nextYears = args[1];
149
148
  }
150
- if (args.lenght >= 3) {
149
+ if (args.length >= 3) {
151
150
  myDefault = args[2];
152
151
  }
153
152
  }
@@ -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
- console.log("-"+JSON.stringify(args));
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;