Skip to content

WEEK() built-in #44

Description

@DDecoene

Scope

Add an ISO-8601 week-number built-in to src/interpreter/Builtins.ts, same shape as the existing YEAR()/MONTH()/DAY() cases (contributed in PR #17).

WEEK(date) → ISO week number (1-53), Monday-start weeks, week 1 = the week containing the year's first Thursday.

Branch

feature/<name> off release/v1.2.0, PR targets release/v1.2.0.

Tests

Add unit tests in both tests/Builtins.test.ts (direct) and tests/BuiltinsParse.test.ts (through the parser) — parity requires both since the #4 built-ins previously shipped broken when only direct unit tests (which bypass the parser) existed.

Docs

Update the built-ins table in CLAUDE.md.

Definition of done

Per CLAUDE.md → Definition of done: tests green (vitest + playwright), CLAUDE.md built-ins table updated, changelog entry.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions