@nomideusz/svelte-calendar 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { fmtTime as _fmtTime, fmtDuration, getLabels } from '../../core/locale.js';
1
+ import { fmtTime as _fmtTime, fmtDuration, getLabels, getDefaultLocale } from '../../core/locale.js';
2
2
  export function fmtTime(d, locale) {
3
3
  return _fmtTime(d, locale);
4
4
  }
@@ -47,3 +47,12 @@ export function groupIntoSlots(evts) {
47
47
  }
48
48
  return slots;
49
49
  }
50
+ /** A day in full, in the locale's own order: "Monday, October 19" (en-US),
51
+ * "poniedziałek, 19 października" (pl-PL). For screen-reader names. */
52
+ export function dateLong(ms, locale) {
53
+ return new Date(ms).toLocaleDateString(locale ?? getDefaultLocale(), {
54
+ weekday: 'long',
55
+ month: 'long',
56
+ day: 'numeric',
57
+ });
58
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomideusz/svelte-calendar",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "A themeable Svelte 5 calendar: day, week, scrolling-week and month views, agenda lists, touch-first mobile layouts, drag-and-drop, timezones, a headless API and an embeddable web component.",
5
5
  "type": "module",
6
6
  "sideEffects": [