@react-pakistan/util-functions 1.23.44 → 1.23.45
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.
|
@@ -17,6 +17,7 @@ var dayjs_1 = __importDefault(require("dayjs"));
|
|
|
17
17
|
var get_number_of_days_in_month_1 = require("./get-number-of-days-in-month");
|
|
18
18
|
var getCalendarCurrentMonth = function (_a) {
|
|
19
19
|
var month = _a.month, year = _a.year;
|
|
20
|
+
var today = new Date().getDate();
|
|
20
21
|
return __spreadArray([], Array((0, get_number_of_days_in_month_1.getNumberOfDaysInMonth)({
|
|
21
22
|
year: year,
|
|
22
23
|
month: month,
|
|
@@ -24,6 +25,7 @@ var getCalendarCurrentMonth = function (_a) {
|
|
|
24
25
|
date: (0, dayjs_1.default)("".concat(year, "-").concat(month, "-").concat(index + 1)).format('YYYY-MM-DD'),
|
|
25
26
|
dayOfMonth: index + 1,
|
|
26
27
|
isCurrentMonth: true,
|
|
28
|
+
isToday: !!(today === index + 1),
|
|
27
29
|
}); });
|
|
28
30
|
};
|
|
29
31
|
exports.getCalendarCurrentMonth = getCalendarCurrentMonth;
|