/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * When a builder's backlog events are due, and how long a template or a * backlog event takes (#1195): what a builder's library pane groups and * labels its cards by — the Plan's (`Plan Builder Spec.md` PB27, PB28), and * the Calendar's (`Calendar Spec.md` B18, B20), which shares the kinds. * * Days and weeks are UTC, as every instant on a builder's axis is (#326), * and a week starts on Monday, as the ruler's ISO weeks do. * * @packageDocumentation */ import { type ValueTypeOf } from "@elaraai/east"; import { Schedule } from "@elaraai/e3-ui/internal"; /** How long something takes, decoded — `Schedule.Types.Duration`. */ export type ScheduleDurationValue = ValueTypeOf; /** When a backlog event is due, as a library's Backlog tab groups it. */ export type DueGroup = "thisWeek" | "nextWeek" | "later" | "none"; /** The groups, in the order the tab lists them. */ export declare const DUE_GROUPS: readonly DueGroup[]; /** * The Monday, 00:00 UTC, that begins the week a moment is in. * * @param at - The moment * @returns Its week's first instant */ export declare function weekStartUTC(at: Date): Date; /** * The group a backlog event falls in by when it is due, counted from the week * `now` is in: due before the next week begins — overdue included, as it is * due now — this week; before the week after, next week; any later, later; * with no due date, none. * * @param due - When it is due, if it is * @param now - The moment the weeks are counted from * @returns Its group */ export declare function dueGroupOf(due: Date | undefined, now: Date): DueGroup; /** * A duration in whole minutes, as a kind counts a backlog event's: a month is * 30 days. * * @param step - The duration * @returns Its minutes, rounded half up */ export declare function durationMinutes(step: ScheduleDurationValue): number; //# sourceMappingURL=due.d.ts.map