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

Method formatTime

autochangename/autochangename.ts:537–550  ·  view source on GitHub ↗
(timezone: string)

Source from the content-addressed store, hash-verified

535 };
536
537 return await DataManager.saveUserSettings(settings);
538 }
539
540 private readonly cleanTimeRegex = /\b\d{1,2}:\d{2}(\s?(AM|PM))?\b/gi;
541 private readonly clockEmojiRegex = /[\u{1F550}-\u{1F567}]/gu;
542
543 cleanTimeFromName(name: string): string {
544 if (!name) return "";
545 return name.substring(0, 128)
546 .replace(this.cleanTimeRegex, "")
547 .replace(this.clockEmojiRegex, "")
548 .replace(/\s+/g, " ")
549 .trim();
550 }
551
552 formatTime(timezone: string): string {
553 try {

Callers 1

generateNewNameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected