I am using a Windows computer with Chinese locale. I can format datetime object with Chinese abbreviated month name:
>>> t = datetime.datetime(2015,11,2)
>>> print unicode(t.strftime('%Y%b%d'))
2015十一月02
Now I want to get English abbreviated month name (2015sep02), so I tyied blow code:
import locale
locale.setlocale(locale.LC_ALL, 'en_US')
t = datetime.datetime(2015,11,2)
print t.strftime('%Y%b%d')
But I got erro message: ValueError: _locale emulation only supports "C" locale
How to solve this problem? I am using Jython 2.7.0 library.
Regards
Yaqiang
*************************************************
Dr. Yaqiang Wang
Chinese Academy of Meteorological Sciences (CAMS)
46, Zhong-Guan-Cun South Avenue
Beijing, 100081
China
yaq...@gm...
http://www.meteothinker.com
**************************************************
|