import { Schema as S } from 'effect'; import { type CalendarDate } from './calendarDate.js'; /** * Schema for days of the week, Sunday through Saturday. Tagged union preferred * over 0-6 numeric indices to avoid magic numbers at call sites. */ export declare const DayOfWeek: S.Literals; export type DayOfWeek = typeof DayOfWeek.Type; /** * Returns the day of the week for a calendar date. * * @example * ```ts * import { Calendar } from 'foldkit' * * Calendar.dayOfWeek(Calendar.make(2026, 1, 1)) // "Thursday" * Calendar.dayOfWeek(Calendar.make(2000, 1, 1)) // "Saturday" * ``` */ export declare const dayOfWeek: (self: CalendarDate) => DayOfWeek; /** * Returns the first day of the month containing `self`. * * @example * ```ts * import { Calendar } from 'foldkit' * * Calendar.firstOfMonth(Calendar.make(2026, 4, 13)) * // { year: 2026, month: 4, day: 1 } * ``` */ export declare const firstOfMonth: (self: CalendarDate) => CalendarDate; /** * Returns the last day of the month containing `self`. Leap-year aware * for February. * * @example * ```ts * import { Calendar } from 'foldkit' * * Calendar.lastOfMonth(Calendar.make(2024, 2, 10)) * // { year: 2024, month: 2, day: 29 } — leap year * * Calendar.lastOfMonth(Calendar.make(2026, 2, 10)) * // { year: 2026, month: 2, day: 28 } * ``` */ export declare const lastOfMonth: (self: CalendarDate) => CalendarDate; /** * Returns the start-of-week date for the week containing `self`, where * `firstDayOfWeek` specifies which day begins the week. Returns `self` * itself when it already falls on `firstDayOfWeek`. * * @example * ```ts * import { Calendar } from 'foldkit' * import { pipe } from 'effect' * * Calendar.startOfWeek(Calendar.make(2026, 4, 15), 'Sunday') * // The Sunday that begins the week containing April 15, 2026 * * pipe(Calendar.make(2026, 4, 15), Calendar.startOfWeek('Monday')) * ``` */ export declare const startOfWeek: { (firstDayOfWeek: DayOfWeek): (self: CalendarDate) => CalendarDate; (self: CalendarDate, firstDayOfWeek: DayOfWeek): CalendarDate; }; /** * Returns the end-of-week date — six days after the start of the week. */ export declare const endOfWeek: { (firstDayOfWeek: DayOfWeek): (self: CalendarDate) => CalendarDate; (self: CalendarDate, firstDayOfWeek: DayOfWeek): CalendarDate; }; //# sourceMappingURL=info.d.ts.map