7089: minor optimization
svn: r23203
This commit is contained in:
parent
060cdf38a1
commit
89a7335057
@ -1715,8 +1715,9 @@ def get_day_list(event_date, holiday_list, bday_anniv_list):
|
||||
return day_list
|
||||
|
||||
def gregorian(date):
|
||||
"""Convert given date to gregorian"""
|
||||
date = gen.lib.Date(date)
|
||||
date.convert_calendar(gen.lib.Date.CAL_GREGORIAN)
|
||||
"""Convert given date to gregorian. Doesn't modify the original object."""
|
||||
if date.get_calendar() != gen.lib.Date.CAL_GREGORIAN:
|
||||
date = gen.lib.Date(date)
|
||||
date.convert_calendar(gen.lib.Date.CAL_GREGORIAN)
|
||||
return date
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user