investira.sdk 2.3.8 → 2.3.10
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/CHANGELOG.md +8 -0
- package/lib/utils/dates.js +5 -5
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -488,3 +488,11 @@ O contrutor para a criação das mensagem foi alterado.
|
|
|
488
488
|
# 2.3.8
|
|
489
489
|
|
|
490
490
|
- [dates] Correção do cálculo de semanas
|
|
491
|
+
|
|
492
|
+
# 2.3.9
|
|
493
|
+
|
|
494
|
+
- [dates] Correção da chamada as constantes
|
|
495
|
+
|
|
496
|
+
# 2.3.10
|
|
497
|
+
|
|
498
|
+
- [dates] Correção da função workingDaysInMonth
|
package/lib/utils/dates.js
CHANGED
|
@@ -297,11 +297,11 @@ const dates = {
|
|
|
297
297
|
try {
|
|
298
298
|
if (isNumber(pDate)) {
|
|
299
299
|
// @ts-ignore
|
|
300
|
-
const xSeconds = Math.floor((pDate / ONE_SECOND) % 60);
|
|
300
|
+
const xSeconds = Math.floor((pDate / dates.ONE_SECOND) % 60);
|
|
301
301
|
// @ts-ignore
|
|
302
|
-
const xMinutes = Math.floor((pDate / ONE_MINUTE) % 60);
|
|
302
|
+
const xMinutes = Math.floor((pDate / dates.ONE_MINUTE) % 60);
|
|
303
303
|
// @ts-ignore
|
|
304
|
-
const xHours = Math.floor((pDate / ONE_HOUR) % 24);
|
|
304
|
+
const xHours = Math.floor((pDate / dates.ONE_HOUR) % 24);
|
|
305
305
|
return `${xHours}:${xMinutes}:${xSeconds}`;
|
|
306
306
|
} else if (isDate(pDate)) {
|
|
307
307
|
// @ts-ignore
|
|
@@ -469,8 +469,8 @@ const dates = {
|
|
|
469
469
|
* @returns {number}
|
|
470
470
|
*/
|
|
471
471
|
workingDaysInMonth: pDate => {
|
|
472
|
-
let xDate1 = dates.addDays(dates.startOf('month',
|
|
473
|
-
let xDate2 = dates.endOf('month',
|
|
472
|
+
let xDate1 = dates.addDays(dates.startOf('month', pDate), -1);
|
|
473
|
+
let xDate2 = dates.endOf('month', pDate);
|
|
474
474
|
return dates.workingDaysBetween(xDate1, xDate2);
|
|
475
475
|
},
|
|
476
476
|
/**
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "investira.sdk",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.10",
|
|
4
4
|
"author": "Investira",
|
|
5
5
|
"description": "Investira SDK",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"type": "commonjs",
|
|
8
8
|
"registry": true,
|
|
9
|
-
"raw": "investira.sdk@2.3.
|
|
9
|
+
"raw": "investira.sdk@2.3.10",
|
|
10
10
|
"escapedName": "investira.sdk",
|
|
11
|
-
"rawSpec": "2.3.
|
|
11
|
+
"rawSpec": "2.3.10",
|
|
12
12
|
"saveSpec": null,
|
|
13
|
-
"fetchSpec": "2.3.
|
|
13
|
+
"fetchSpec": "2.3.10",
|
|
14
14
|
"homepage": "https://investira.com.br/",
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=11.11.0 <=18.12",
|