Skip to content

Add field.timezone() with a curated IANA list #107

@akladekouassi

Description

@akladekouassi

Summary

Add field.timezone(label) — a specialized select with a curated IANA timezone list, current-offset display, city grouping, and a "use my timezone" button.

Why this would help

  • Scheduling, calendar settings, profile preferences, automation triggers.
  • Every app reimplements the timezone list; having one canonical, opinionated list shipped with runilib avoids the drift between projects.
  • Live offset display ("Europe/Paris · UTC+02:00") makes selection less ambiguous.

Proposed API

field.timezone('Timezone')
  .format('iana')                    // 'iana' | 'offset'
  .preferred(['Europe/Paris', 'America/New_York'])
  .useMyTimezoneButton(true);

Suggested implementation areas

  • src/core/field-descriptors/timezone/TimezoneFieldBuilder.ts (new) — built on top of SelectFieldBuilder
  • src/core/field-descriptors/timezone/data.ts — curated IANA list (ship a sensible subset)
  • src/core/field-descriptors/field.ts
  • src/renderers/web/ — offset live-computed via Intl.DateTimeFormat
  • src/renderers/native/ — same behavior, native picker styling

Acceptance Criteria

  • field.timezone() returns IANA strings ('Europe/Paris') by default
  • format('offset') returns 'UTC+02:00'-style values
  • Live offset computed from Intl reflects DST correctly
  • "Use my timezone" populates from Intl.DateTimeFormat().resolvedOptions().timeZone
  • Tests covering DST samples and the format toggle

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions