Skip to content

Interface: Habit

index.Habit

Represents a daily habit with optional deadline-based website blocking.

Blocking logic: When ANY habit with a deadline becomes overdue, ALL configured websites are blocked. Blocking continues until ALL overdue habits are completed or skipped. Habits without deadlines never trigger blocking.

Properties

activeDays

Optional activeDays: number[]

Days of week when active. 0=Sun, 6=Sat. Undefined = every day.

Defined in

types.ts:39


createdAt

createdAt: string

ISO 8601 timestamp when created (UTC)

Defined in

types.ts:41


dataTracking

dataTracking: boolean

When true, prompts for numeric data entry on completion

Defined in

types.ts:35


dataUnit

Optional dataUnit: string

Unit label for data tracking (e.g., "minutes", "pages")

Defined in

types.ts:37


deadlineLocal

Optional deadlineLocal: string

Deadline in HH:MM format (user's local timezone). Computed from deadlineUtc.

Defined in

types.ts:31


deadlineUtc

Optional deadlineUtc: string

Deadline in HH:MM format (UTC). Blocking starts when current time exceeds this.

Defined in

types.ts:29


description

Optional description: string

Optional longer description

Defined in

types.ts:27


id

id: string

Unique identifier (UUID v4)

Defined in

types.ts:23


isActive

isActive: boolean

Whether habit appears in daily checklist

Defined in

types.ts:43


name

name: string

Display name shown in the checklist

Defined in

types.ts:25


timezoneOffset

timezoneOffset: number

Timezone offset in minutes from UTC (e.g., -300 for EST)

Defined in

types.ts:33

Built with VitePress