7066: some massaging of ICU version, still fails
svn: r23129
This commit is contained in:
parent
da749a3fbc
commit
b22b533846
@ -585,15 +585,17 @@ except ImportError:
|
|||||||
try:
|
try:
|
||||||
from icu import Locale, GregorianCalendar, Calendar
|
from icu import Locale, GregorianCalendar, Calendar
|
||||||
_hcal = Calendar.createInstance(
|
_hcal = Calendar.createInstance(
|
||||||
Locale.createFromName('@calendar=hebrew'))
|
Locale.createFromName('C@calendar=hebrew'))
|
||||||
def hebrew_ymd(sdn):
|
def hebrew_ymd(sdn):
|
||||||
y,m,d = gregorian_ymd(sdn)
|
y,m,d = gregorian_ymd(sdn)
|
||||||
gcal = GregorianCalendar()
|
gcal = GregorianCalendar()
|
||||||
gcal.set(y,m,d)
|
gcal.clear()
|
||||||
|
gcal.set(y,m,d, 11, 59)
|
||||||
|
_hcal.clear()
|
||||||
_hcal.setTime( gcal.getTime() )
|
_hcal.setTime( gcal.getTime() )
|
||||||
return (_hcal.get(Calendar.YEAR),
|
return (_hcal.get(Calendar.YEAR),
|
||||||
_hcal.get(Calendar.MONTH),
|
_hcal.get(Calendar.MONTH),
|
||||||
_hcal.get(Calendar.DAY_OF_YEAR))
|
_hcal.get(Calendar.DATE))
|
||||||
# Not much better than our version... fails on 1789-11-4(hebrew),
|
# Not much better than our version... fails on 1789-11-4(hebrew),
|
||||||
# unlike sdn!
|
# unlike sdn!
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user