claude-starter 1.3.1 → 1.3.2
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/index.js +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -393,7 +393,9 @@ function formatTimestamp(ts) {
|
|
|
393
393
|
if (!ts) return 'unknown';
|
|
394
394
|
const d = new Date(ts);
|
|
395
395
|
const now = new Date();
|
|
396
|
-
const
|
|
396
|
+
const todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
397
|
+
const targetStart = new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
398
|
+
const diffDays = Math.round((todayStart.getTime() - targetStart.getTime()) / 86400000);
|
|
397
399
|
const time = d.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', hour12: false });
|
|
398
400
|
if (diffDays === 0) return `Today ${time}`;
|
|
399
401
|
if (diffDays === 1) return `Yesterday ${time}`;
|