@react-pakistan/util-functions 1.24.92 → 1.24.93
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.
|
@@ -9,8 +9,8 @@ exports.fullMonthRange = void 0;
|
|
|
9
9
|
*/
|
|
10
10
|
var fullMonthRange = function (month, year) {
|
|
11
11
|
var now = new Date();
|
|
12
|
-
var targetYear = year !== null && year !== void 0 ? year : now.
|
|
13
|
-
var targetMonth = month !== null && month !== void 0 ? month : now.
|
|
12
|
+
var targetYear = year !== null && year !== void 0 ? year : now.getUTCFullYear();
|
|
13
|
+
var targetMonth = month !== null && month !== void 0 ? month : now.getUTCMonth();
|
|
14
14
|
// Start of month: first day at 00:00:00.000
|
|
15
15
|
var startOfMonth = new Date(targetYear, targetMonth, 1, 0, 0, 0, 0);
|
|
16
16
|
// End of month: last day at 23:59:59.999
|