brightspace-mcp-server 3.11.14 → 3.11.15
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/build/utils/due-in.js +11 -7
- package/package.json +1 -1
package/build/utils/due-in.js
CHANGED
|
@@ -27,15 +27,19 @@ export function dueIn(dueDate, now = Date.now()) {
|
|
|
27
27
|
if (!Number.isFinite(due))
|
|
28
28
|
return null;
|
|
29
29
|
const diffMs = due - now;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
// Pick the unit from the rounded count, not the raw distance: 23.6 hours
|
|
31
|
+
// rounds to 24, which reads as "tomorrow", not "in 24 hours".
|
|
32
|
+
const minutes = Math.round(diffMs / MINUTE_MS);
|
|
33
|
+
if (Math.abs(minutes) < 60) {
|
|
34
|
+
return relativeTimeFormat.format(minutes, "minute");
|
|
33
35
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
const hours = Math.round(diffMs / HOUR_MS);
|
|
37
|
+
if (Math.abs(hours) < 24) {
|
|
38
|
+
return relativeTimeFormat.format(hours, "hour");
|
|
36
39
|
}
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
const days = Math.round(diffMs / DAY_MS);
|
|
41
|
+
if (Math.abs(days) < 7) {
|
|
42
|
+
return relativeTimeFormat.format(days, "day");
|
|
39
43
|
}
|
|
40
44
|
return relativeTimeFormat.format(Math.round(diffMs / WEEK_MS), "week");
|
|
41
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brightspace-mcp-server",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.15",
|
|
4
4
|
"mcpName": "io.github.RohanMuppa/brightspace",
|
|
5
5
|
"description": "MCP server for Brightspace (D2L). Check grades, due dates, assignments, announcements, syllabus, rosters and more via Claude, ChatGPT, Cursor, Windsurf, or any MCP client.",
|
|
6
6
|
"type": "module",
|