Circle V2 API Docs
    Preparing search index...

    One calendar week under a stated convention.

    Built on date-fns so the year rollover is the library's problem. Days in and out are yyyy-MM-dd: an instant has to be resolved to a day in some zone before a week can mean anything, and that resolution belongs to the caller.

    Index

    Properties

    Accessors

    Methods

    Properties

    end: string
    key: string
    start: string

    Accessors

    • get span(): string

      2026-02-01..2026-02-07.

      Returns string

    Methods

    • Parameters

      • day: string

      Returns boolean

    • How far into this week a day sits — 0 for the first day, 6 for the last. Null when not in it.

      What a one-directional uncertainty is measured against: a value recorded on or after whatever it describes can only have happened earlier, so one early in its week may belong to the week before.

      Parameters

      • day: string

      Returns number | null

    • The week a day falls in, or null when the day is not a real yyyy-MM-dd.

      Parameters

      Returns Week | null

    • Every week from one day's week to another's, inclusive and gapless.

      A week holding nothing appears in no record of what happened, so it exists only if the walk emits it. Returns empty rather than a partial range when a day is unreadable or they are reversed.

      Parameters

      Returns Week[]