# Ethiopian Calendar
A Dart package for working with the Ethiopian Calendar (also known as Ge'ez Calendar), providing easy conversion between Ethiopian and Gregorian dates along with localized formatting options.
## Features
- Convert dates between Ethiopian and Gregorian calendars
- Format Ethiopian dates in various styles (full, short, etc.)
- Support for Amharic month and day names
- Extension methods for easy date formatting
- Accurate handling of Ethiopian calendar's unique characteristics:
- 13 months (12 months of 30 days + 1 month of 5/6 days)
- Different new year (September 11/12)
- ~7/8 years difference from Gregorian calendar
## Getting Started
Add this package to your project's `pubspec.yaml`:
```yaml
dependencies:
ethiopian_calendar_plus: ^1.0.0
intl: ^any # Required dependency
```
## Usage
### Basic Date Conversion
```dart
import 'package:ethiopian_calendar/ethiopian_calendar.dart';
void main() {
// Convert from Gregorian to Ethiopian
final gregorianDate = DateTime(2024, 3, 20);
final ethiopianDate = EthiopianDateConverter.gregorianToEthiopian(gregorianDate);
print(ethiopianDate); // Output: 2016-07-11
// Convert from Ethiopian to Gregorian
final backToGregorian = EthiopianDateConverter.ethiopianToGregorian(2016, 7, 11);
print(backToGregorian); // Output: 2024-03-20
}
```
### Formatting Ethiopian Dates
```dart
import 'package:ethiopian_calendar/ethiopian_calendar.dart';
import 'package:intl/intl.dart';
void main() {
final date = DateTime(2024, 3, 20);
final dateFormat = DateFormat();
// Format with Amharic month names
print(dateFormat.formatEthiopian(date));
// Output: 11 መጋቢት 2016
// Short format
print(dateFormat.formatEthiopianShort(date));
// Output: 11/7/2016
// Full format with weekday
print(dateFormat.formatEthiopianFull(date));
// Output: ረቡዕ, 11 መጋቢት 2016
// Get Ethiopian weekday
print(dateFormat.getEthiopianWeekday(date));
// Output: ረቡዕ
}
```
### Working with Ethiopian Dates Directly
```dart
import 'package:ethiopian_cale …