MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / formatDate

Function formatDate

uai/uai.ts:81–88  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

79 const min = String(date.getMinutes()).padStart(2, "0");
80 return `${y}/${m}/${d} ${h}:${min}`;
81}
82
83function getTodayStart(): number {
84 const now = new Date();
85 now.setHours(0, 0, 0, 0);
86 return Math.floor(now.getTime() / 1000);
87}
88
89// 解析时间参数:2h -> 2小时, 30m -> 30分钟
90function parseTimeLimit(s: string): number | null {
91 const match = s.match(/^(\d+)(h|m)$/i);

Callers 1

collectMessagesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected