Add editable weather captions and manage Threads scheduling with PM2

This commit is contained in:
2026-11-02 04:07:40 +09:00
parent 8c2113a323
commit 6ce32d33fe
17 changed files with 305 additions and 50 deletions
+12
View File
@@ -0,0 +1,12 @@
import { fromKstInput, kstFields } from '../../src/ui/time.ts';
import { THREADS } from '../../src/constants/threads.ts';
export function nextRunAt(now: Date, completedDate?: string): Date {
const date = kstFields(now).date;
const today = fromKstInput(date, THREADS.scheduleHourKst * 60);
if (completedDate === date) {
const tomorrow = new Date(+fromKstInput(date, 12 * 60) + 86_400_000);
return fromKstInput(kstFields(tomorrow).date, THREADS.scheduleHourKst * 60);
}
return +now < +today ? today : now;
}