Note
This version of the Ethiopian Calendar tool is a fork from Renaud’s version. The only difference is that when converting a date to the Julian calendar, this version returns a (year, month, day) tuple instead of a datetime.datetime object.
We cannot use the native Python datetime class because the Julian calendar has 13 months, and the Python libraries can only deal with 12 months.
Ethiopian Calendar tool for Python 2.6
Copyright (c) 2010 Renaud Gaudin <rgaudin@gmail.com>
This tool is a python port of Java Code from Ealet 2.0 by Senamirmir Project.
This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class methods for converting between Ethiopian and Gregorian
Ethiopian date object representation of provided Gregorian date
Shortcut to to_ethiopian() classmethod using a date parameter
Parameters: | adate (datetime.date) – Gregorian date to conver to Julian calendar |
---|