fix(release): harden packaging and filename localization

This commit is contained in:
NimBold
2026-07-30 05:08:26 +03:30
parent 1634118f11
commit 924e108f3c
6 changed files with 41 additions and 5 deletions
+4 -1
View File
@@ -79,7 +79,10 @@ const formatPersianDateTime = (
const hasDateOptions = Object.keys(options).some(key => DATE_OPTION_KEYS.has(key));
const hasTimeOptions = options.timeStyle !== undefined ||
TIME_OPTION_KEYS.some(key => (options as unknown as Record<string, unknown>)[key] !== undefined);
const includeDate = Object.keys(options).length === 0 || hasDateOptions;
// Locale and timezone options do not select a date or time field by
// themselves. Match Intl's default date behavior for those option-only
// calls instead of returning an empty string.
const includeDate = hasDateOptions || !hasTimeOptions;
const parts: string[] = [];
if (includeDate) {