globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 602 forks source link

Cannot get timezone names or the abbreviations from globalizer #933

Open PavaniYash opened 2 years ago

PavaniYash commented 2 years ago

Hi,

Is there any way to get timezone names and abbreviations from the globalize library? As per the comment - [https://github.com/globalizejs/globalize/issues/673#issuecomment-309430240] globalize support this.

Current values returned by executing the above statements are as follows.

Globalize.dateFormatter({ datetime: "full", timeZone: "Europe/Berlin" })( new Date() )

'Wednesday, October 5, 2022 at 4:16:54 PM GMT+02:00' // Expected to return "Monday, November 1, 2010 at 8:55:00 PM Central European Standard Time"

Globalize.dateFormatter({ raw: 'z', timeZone: "Europe/Berlin" })( new Date() )

'GMT+2' //Expected to return "EST"

Is this a bug and any plans to fix these?