bonjour.ethiopian_date

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 bonjour.ethiopian_date.EthiopianDateConverter[source]

Class methods for converting between Ethiopian and Gregorian

classmethod date_to_ethiopian(adate)[source]

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
classmethod to_ethiopian(year, month, date)[source]

Ethiopian date object representation of provided Gregorian date

Parameters:
  • year (int) – Gregorian year
  • month (int) – Gregorian month
  • date (int) – Gregorian day
classmethod to_gregorian(year, month, date)[source]

Gregorian date object representation of provided Ethiopian date

Parameters:
  • year (int) – Julian year
  • month (int) – Julian month
  • date (int) – Julian day