@wix/himalaya-cli 0.1663.0 → 0.1664.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.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +6 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +6 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +3 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +3 -2
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{5fe817d61d13666ee8e6951d96a873f768ef305462735f6030cce105f1c21488.bin → 7700021a25a8d932331f2abf6ba6c2f13b2a18cabfc4ce8b02aa0ed1ae973ffc.bin} +1 -1
- package/dist/browser-plane/sw.js +8 -8
- package/dist/cli.mjs +56 -45
- package/dist/preview-assets.generated.bin +0 -0
- package/fixtures/wix-canned.json +3 -0
- package/guides/component-reference.json +1 -1
- package/guides/component-reference.md +1 -0
- package/package.json +2 -2
- package/templates/beauty-salon/config.ts +1 -1
- package/templates/beauty-salon/l10n/en.json +1 -1
- package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/branded-lite/config.ts +1 -1
- package/templates/branded-lite/dev/index.ts +214 -122
- package/templates/branded-lite/l10n/en.json +18 -25
- package/templates/branded-lite/l10n/he.json +22 -17
- package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/branded-lite/tier5-src/wix-spaces-member-detail/index.ts +144 -75
- package/templates/community-club/config.ts +1 -1
- package/templates/community-club/l10n/en.json +1 -1
- package/templates/community-club/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/conference/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/events-meetups/config.ts +1 -1
- package/templates/events-meetups/l10n/en.json +1 -1
- package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/gym-fitness/config.ts +1 -1
- package/templates/gym-fitness/l10n/en.json +1 -1
- package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/nonprofit-cause/config.ts +1 -1
- package/templates/nonprofit-cause/l10n/en.json +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/podcast-creator/config.ts +1 -1
- package/templates/podcast-creator/l10n/en.json +1 -1
- package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/portfolio-creative/config.ts +1 -1
- package/templates/portfolio-creative/l10n/en.json +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/restaurant/config.ts +1 -1
- package/templates/restaurant/l10n/en.json +1 -1
- package/templates/restaurant/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/retail-store/config.ts +1 -1
- package/templates/retail-store/l10n/en.json +1 -1
- package/templates/retail-store/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/salon-spa/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/wholesale-store/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/yoga-studio/config.ts +1 -1
- package/templates/yoga-studio/l10n/en.json +1 -1
- package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +3 -4
- package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +3 -4
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -37,7 +37,7 @@ export default defineApp({
|
|
|
37
37
|
actions: "http://localhost:8190/v1/actions",
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
|
-
capabilities: ["push","share","secure_storage","open_url","calendar","local_database","media_playback","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","
|
|
40
|
+
capabilities: ["push","share","ui","secure_storage","open_url","calendar","local_database","media_playback","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","wix_cashier"],
|
|
41
41
|
cache: {
|
|
42
42
|
"rules": [
|
|
43
43
|
{
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -37,7 +37,7 @@ export default defineApp({
|
|
|
37
37
|
actions: "http://localhost:8190/v1/actions",
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
|
-
capabilities: ["live_activity","push","share","secure_storage","open_url","calendar","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","
|
|
40
|
+
capabilities: ["live_activity","push","share","ui","secure_storage","open_url","calendar","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","media_playback","wix_cashier"],
|
|
41
41
|
cache: {
|
|
42
42
|
"rules": [
|
|
43
43
|
{
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -37,7 +37,7 @@ export default defineApp({
|
|
|
37
37
|
actions: "http://localhost:8190/v1/actions",
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
|
-
capabilities: ["push","share","secure_storage","open_url","calendar","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","
|
|
40
|
+
capabilities: ["push","share","ui","secure_storage","open_url","calendar","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","wix_cashier"],
|
|
41
41
|
cache: {
|
|
42
42
|
"rules": [
|
|
43
43
|
{
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -37,7 +37,7 @@ export default defineApp({
|
|
|
37
37
|
actions: "http://localhost:8190/v1/actions",
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
|
-
capabilities: ["live_activity","push","share","secure_storage","open_url","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","
|
|
40
|
+
capabilities: ["live_activity","push","share","ui","secure_storage","open_url","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","wix_cashier"],
|
|
41
41
|
cache: {
|
|
42
42
|
"rules": [
|
|
43
43
|
{
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -37,7 +37,7 @@ export default defineApp({
|
|
|
37
37
|
actions: "http://localhost:8190/v1/actions",
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
|
-
capabilities: ["push","share","secure_storage","open_url","calendar","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","
|
|
40
|
+
capabilities: ["push","share","ui","secure_storage","open_url","calendar","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","wix_cashier"],
|
|
41
41
|
cache: {
|
|
42
42
|
"rules": [
|
|
43
43
|
{
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|
|
@@ -94,11 +94,10 @@ export function formatDateMedium(date: Date, locale = appLocale(), timeZone?: st
|
|
|
94
94
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
/** `{ month: "short", year: "numeric" }` — "
|
|
97
|
+
/** `{ month: "short", year: "numeric" }` — "Jul 2026", without parsing a localized day.
|
|
98
|
+
* Like the other date helpers, an engine without Intl keeps the documented en-US fallback. */
|
|
98
99
|
export function formatMonthYear(date: Date, locale = "en-US", timeZone?: string): string {
|
|
99
|
-
if (hasIntl()) {
|
|
100
|
-
return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
101
|
-
}
|
|
100
|
+
if (hasIntl()) return dateFormat(locale, { month: "short", year: "numeric" }, timeZone).format(date);
|
|
102
101
|
return `${MONTHS_SHORT[date.getMonth()]} ${date.getFullYear()}`;
|
|
103
102
|
}
|
|
104
103
|
|