-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Maybe this could be documented in README, I imagine this question might come up. Let's say as a user, I'd like to be able to use this library in pure code to format a DateTime as String. You can't currently do that—the DateTimeFormat.new constructor returns in Effect because if none of the Locales passed in are supported it will fall back to the host machine's default locale. Same applies for other service constructors.
For example, "yue" is the language tag for Cantonese, but at time of writing the DateTimeFormat implementation in Chrome (115) does not support it, so the locale resolves to "en-US" on my machine.
const dateTimeFormat = new Intl.DateTimeFormat("yue")
dateTimeFormat.resolvedOptions().locale // "en-US"Metadata
Metadata
Assignees
Labels
No labels