jira-ai 0.4.13 → 0.4.14
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/dist/lib/utils.js +4 -3
- package/package.json +1 -1
package/dist/lib/utils.js
CHANGED
|
@@ -150,10 +150,11 @@ export function parseTimeframe(timeframe) {
|
|
|
150
150
|
const days = parseInt(match[1], 10);
|
|
151
151
|
const endDate = new Date();
|
|
152
152
|
const startDate = new Date();
|
|
153
|
-
|
|
153
|
+
// Use UTC to avoid timezone issues during calculations
|
|
154
|
+
startDate.setUTCDate(endDate.getUTCDate() - days);
|
|
154
155
|
// Set to start of day for startDate and end of day for endDate to be inclusive
|
|
155
|
-
startDate.
|
|
156
|
-
endDate.
|
|
156
|
+
startDate.setUTCHours(0, 0, 0, 0);
|
|
157
|
+
endDate.setUTCHours(23, 59, 59, 999);
|
|
157
158
|
return { startDate, endDate };
|
|
158
159
|
}
|
|
159
160
|
/**
|