MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / formatConferenceTimeline

Function formatConferenceTimeline

deployments/desktop/static/desktop.js:5137–5151  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

5135 ];
5136
5137 function formatConferenceTimeline(value) {
5138 let text = String(value || "").trim();
5139 if (state.locale !== "en" || !text) return text;
5140 const phase = { "初": "early", "中": "mid", "底": "late" };
5141 text = text.replace(/(\d{1,2})\s*-\s*(\d{1,2})\s*月/g, (_match, start, end) => {
5142 const startMonth = englishMonthNames[Number(start)] || start;
5143 const endMonth = englishMonthNames[Number(end)] || end;
5144 return `${startMonth}-${endMonth}`;
5145 });
5146 text = text.replace(/(\d{1,2})\s*月\s*(初|中|底)?/g, (_match, month, suffix) => {
5147 const monthName = englishMonthNames[Number(month)] || month;
5148 return suffix ? `${phase[suffix] || ""} ${monthName}`.trim() : monthName;
5149 });
5150 return text;
5151 }
5152
5153 function renderConferenceSettings(sourcePrefs = {}) {
5154 const target = $("settingConferenceList");

Callers 1

renderConferenceSettingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected