DateConverter class

Constructors

DateConverter()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

calculateEthiopianAge({required int birthYear, required int birthMonth, required int birthDay}) Map<String, int>
Calculate age from birthdate in Ethiopian calendar Returns Map with years, months, and days
calculateGregorianAge({required int birthYear, required int birthMonth, required int birthDay}) Map<String, int>
Calculate age from Gregorian birthdate Returns Map with years, months, and days
ethiopianToGregorian({required int year, required int month, required int day}) Map<String, int>
Convert Ethiopian date to Gregorian date Input: year, month, day in Ethiopian calendar Returns: Map with 'year', 'month', 'day' keys for Gregorian date
ethiopianToGregorianString(String ethiopianDateStr, {String separator = '/'}) String
Convert Ethiopian date string to Gregorian date string Input format: "day/month/year" or "day-month-year" Returns: Formatted Gregorian date string
getEthiopianAgeString({required int birthYear, required int birthMonth, required int birthDay, required String language}) String
Convert Ethiopian birthdate to age string
getEthiopianMonthName(int month, String language) String
Get Ethiopian month name in different languages
getGregorianAgeString({required int birthYear, required int birthMonth, required int birthDay, required String language}) String
Convert Gregorian birthdate to age string
getTodayEthiopian() Map<String, int>
Get today's Ethiopian date
getTodayEthiopianString({String separator = '/'}) String
Get today's Ethiopian date as formatted string
gregorianToEthiopian({required int year, required int month, required int day}) Map<String, int>
Convert Gregorian date to Ethiopian date Input: year, month, day in Gregorian calendar Returns: Map with 'year', 'month', 'day' keys for Ethiopian date
gregorianToEthiopianString(String gregorianDateStr, {String separator = '/'}) String
Convert Gregorian date string to Ethiopian date string Input format: "day/month/year" or "day-month-year" Returns: Formatted Ethiopian date string
parseAndValidateDateString(String dateStr, {bool isEthiopian = false}) Map<String, int>
Validate and parse date string with strict format checking