ALD*_*ENT 4 javascript timezone translation abbreviation momentjs
moment 库是否支持 EST、IST 等时区缩写的翻译。这些时区缩写在不同国家有不同的翻译/措辞吗?
一些东西:
\n\nMoment 本身根本无法为您提供时区缩写。
moment -timezone插件可以为您提供IANA 时区数据库中存在的缩写。我在这里证明了这一点。
时区数据库仅包含每个时区的一组缩写。通常,它们只是英语表示形式 - 然而,有些可以被解释为英语或其他语言,例如MSK
(在俄罗斯莫斯科使用)。
时区缩写有时不明确(CST = 中部标准时间 [美国] 或中国标准时间),有时有多个有效缩写(夏威夷 = HST 或 HAST)。
在某些情况下,缩写根本不存在,因此 IANA 时区数据库只会给出一个数字。例如,Europe/Minsk
just"+03"
作为 tz 数据库中的当前缩写。
所以总的来说,答案是否定的。
\n\n但是,如果您查看CLDR,您会发现一些时区有非英语缩写。例如,加拿大时区有法语缩写(因为加拿大同时讲英语和法语):
\n\nen_US\n------------------------------------\nPST = Pacific Standard Time\nPDT = Pacific Daylight Time\nMST = Mountain Standard Time\nMDT = Mountain Daylight Time\nCST = Central Standard Time\nCDT = Central Daylight Time\nEST = Eastern Standard Time\nEDT = Eastern Daylight Time\n\nfr_CA\n------------------------------------\nHNP = heure normale du Pacifique\nHAP = heure avanc\xc3\xa9e du Pacifique\nHNR = heure normale des Rocheuses\nHAR = heure avanc\xc3\xa9e des Rocheuses\nHNC = heure normale du Centre\nHAC = heure avanc\xc3\xa9e du Centre\nHNE = heure normale de l\xe2\x80\x99Est\nHAE = heure avanc\xc3\xa9e de l\xe2\x80\x99Est\n
Run Code Online (Sandbox Code Playgroud)\n\n我什至不确定现实中是否真的使用了法语缩写。
\n\n在加拿大法语区之外,您在任何地方都找不到许多翻译时区缩写的权威来源。如果你这样做,我很感兴趣,但总的来说 - 时区缩写的概念反映了一种非常西方和英国的世界思维方式。我的建议是尽可能避免它们。
\n