ethiopian_calendar_converter 0.0.2 ethiopian_calendar_converter: ^0.0.2 copied to clipboard
A new Flutter Package that will help to change gregorian calendar to ethiopian calendar and viceversa.
ethiopian_calender #
A flutter package that helps to change Ethiopian calender to Gregorian calender and vice versa.
Getting Started #
This package contains functions to change Ethiopian calender to Gregorian calender which accepts EthiopianDateTime and returns DateTime Object.
Installation #
To use this package, add ethiopian_calender as a dependency in your pubspec.yaml file.
ethiopian_calendar: ^0.0.2
Usage/Examples #
Converter #
import 'package:ethiopian_calendar/ethiopian_date_converter.dart';
Want to convert to Ethiopian Date? Call convertToEthiopianDate
method, it will return a EthiopianDateTime Model
EthiopianDateConverter.convertToEthiopianDate(DateTime.now());
if you want vice versa, call convertToGregorianDate
EthiopianDateConverter.convertToGregorianDate(EthiopianDateTime(2016,01,01));
Formatter #
To format a DateTime, create a EthiopianDateFormatter instance. These can be created using a set of commonly used skeletons taken from ICU/CLDR or using an explicit pattern. For details on the supported skeletons and patterns see DateFormat.
EthiopianDateFormatter("yyyy, MMM, dd").format(EthiopianDateTime(2016, 01, 01));
using other locals
EthiopianDateFormatter("yyyy, MMM, dd", "am").format(EthiopianDateTime(2016, 01, 01));
Supported locals are : Amharic(am), Tigrinya(ti), Oromifa(om), Somalia(so)
Features #
- Ethiopian calender to Gregorian calender converter
- Gregorian calender to Ethiopian calender converter
- Ethiopian DateTime Formatter