TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Missing Intl.Locale.prototype.getWeekInfo()

Open sonicdoe opened this issue 8 months ago • 3 comments

⚙ Compilation target

esnext

⚙ Library

ESNext

Missing / Incorrect Definition

Intl.Locale.prototype.getWeekInfo() of the Intl Locale Info API is missing.

The method is available in multiple major browsers as well as in Node.js since v18.

Sample Code

const enUS = new Intl.Locale("en-US");
console.log(enUS.getWeekInfo());

Documentation Link

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo

sonicdoe avatar May 16 '25 14:05 sonicdoe

There's also this related PR that's been on hold https://github.com/microsoft/TypeScript/pull/58084

wlib avatar May 17 '25 15:05 wlib

Any updates on this issue or in the related pull request? As I've seen, the latest update on the mentioned pull request is from 2024.

mauroviniciussilva avatar Aug 28 '25 15:08 mauroviniciussilva

Note that Firefox does not support this function, so it's not safe to use in modern web. You can track the implementation in their issue tracker.

json-derulo avatar Dec 11 '25 09:12 json-derulo