Skip to content

Latest commit

 

History

History
188 lines (110 loc) · 6.57 KB

File metadata and controls

188 lines (110 loc) · 6.57 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

2.3.1 - 2026-08-11

Fixes

  • break adaptive live interval loop at tier boundaries in Time
  • break adaptive live interval loop at tier boundaries in Duration

2.3.0 - 2026-07-26

Features

  • add Countdown component, svelteCountdown action, and countdown attachment
  • add Stopwatch component, svelteStopwatch action, and stopwatch attachment
  • add TimeRange component, svelteTimeRange action, and timeRange attachment
  • add svelte-time/intl, a zero-dependency Intl-based alternative

2.2.0 - 2026-07-08

Features

  • add Duration component, svelteDuration action, and duration attachment
  • add time attachment
  • add children snippet support for custom markup in Time and Duration
  • add tz prop for per-instance timezone conversion
  • add relativeStyle prop for compact relative time output
  • add relativeThreshold prop to control relative time thresholds
  • export now, formatTime, and relativeTime primitives
  • annotate generated locale union with human-readable names
  • upgrade dayjs to ^1.11.21

Fixes

  • preserve falsy timestamps in svelteTime
  • emit valid ISO 8601 datetime values for non-string timestamps
  • restore hand-rolled .d.ts files for dayjs, datetime, and ticker subpath exports
  • correct format typing, remove the phantom formatted prop, and export public types
  • avoid passing a null title to setAttribute
  • improve type safety across Time, Duration, formatting helpers, ticker utilities, and generated declarations

Performance

  • parse timestamps once and reuse derived values
  • update action output via textContent
  • share a single live-update timer across components
  • add adaptive live-update scheduling with visibility-aware refresh

2.1.0 - 2026-01-12

Features

  • add withoutSuffix prop to remove "ago" suffix from relative time (e.g., "2 hours" instead of "2 hours ago")
  • add locale prop to support internationalization with multiple locales

2.0.2 - 2025-10-23

Fixes

  • restore reactivity for Time component and svelteTime action

2.0.1 - 2025-02-24

Fixes

  • fix svelteTime import in TypeScript definitions

2.0.0 - 2025-01-23

The library is modernized to only support Svelte 5 (Runes mode). There are no component API changes.

Use svelte-time@1.0.0 for Svelte 3/4 support. v1 is also compatible with Svelte 5 (non-Runes mode).

Breaking Changes

  • update Time.svelte to use Runes
  • update svelteTime action to use Runes
  • update TypeScript definitions to replace deprecated SvelteComponentTyped with Component

1.0.0 - 2025-01-23

Features

  • establish a stable release before upgrading to Svelte 5

Fixes

  • upgrade dayjs to v1.11.13

0.9.0 - 2024-04-19

Features

  • allow title attribute to be overridden

0.8.2 - 2023-12-16

Fixes

  • fix exports in package.json to include types; add exports for ./src/*.svelte and ./src/*

0.8.1 - 2023-12-16

Fixes

  • add exports to package.json to resolve Vite development warnings

0.8.0 - 2023-07-27

Breaking Changes

  • minimum Svelte version required is 3.55

Features

  • update type definitions to support Svelte 4
  • upgrade dayjs to v1.11.9

0.7.2 - 2023-06-04

  • upgrade dayjs to v1.11.8
  • fix Time.svelte types to allow data-* attributes (e.g., data-test-id)

0.7.1 - 2022-06-18

  • use default CJS imports from dayjs instead of ESM
  • upgrade dayjs to v1.11.3
  • fix TypeScript definition for re-exported dayjs function to extend the relativeTime plugin
  • fix svelteTime action to update when using a custom live interval
  • fix svelteTime action to also set the datetime attribute

0.7.0 - 2022-05-15

  • format title attribute using format prop when using relative time

0.6.3 - 2022-05-15

  • revert back to using ESM exports from dayjs

0.6.2 - 2022-05-15

  • use default CJS imports from dayjs instead of ESM

0.6.1 - 2021-12-16

  • set type="module" in package.json

0.6.0 - 2021-10-10

  • extend TimeProps in svelte-time.d.ts SvelteTimeOptions interface

0.5.0 - 2021-09-15

  • Use .svelte.d.ts extension for component TypeScript definition

0.4.2 - 2021-09-01

  • Update documentation on exported dayjs function

0.4.1 - 2021-08-24

  • Fix live prop value in README.md
  • Add example set-ups (SvelteKit, Vite, Sapper, Rollup, Webpack)

0.4.0 - 2021-07-27

  • Export dayjs from src/index.js

0.3.1 - 2021-07-27

  • Add TypeScript definition for svelte-time/src/dayjs export

0.3.0 - 2021-03-02

  • Forward $$restProps to the time element

0.2.0 - 2021-02-28

  • Add live prop to update a relative timestamp at an interval

0.1.0 - 2021-02-27

  • Initial release