rm js fns

This commit is contained in:
2026-01-16 17:44:14 -06:00
parent ac91495679
commit b46406f755
42 changed files with 1954 additions and 2335 deletions

View File

@@ -161,7 +161,7 @@ function time_text(num = now(),
dst = rec.dst;
/* am/pm */
if (fmt.includes("a")) {
if (search(fmt, "a") != null) {
if (rec.hour >= 13) { rec.hour -= 12; fmt = fmt.replaceAll("a", "PM"); }
else if (rec.hour == 12) { fmt = fmt.replaceAll("a", "PM"); }
else if (rec.hour == 0) { rec.hour = 12; fmt = fmt.replaceAll("a", "AM"); }
@@ -170,7 +170,7 @@ function time_text(num = now(),
/* BCE/CE */
var year = rec.year > 0 ? rec.year : rec.year - 1;
if (fmt.includes("c")) {
if (search(fmt, "c") != null) {
if (year < 0) { year = abs(year); fmt = fmt.replaceAll("c", "BC"); }
else fmt = fmt.replaceAll("c", "AD");
}