EthiopianCalendarConverter 1.2.0
See the version list below for details.
dotnet add package EthiopianCalendarConverter --version 1.2.0
NuGet\Install-Package EthiopianCalendarConverter -Version 1.2.0
<PackageReference Include="EthiopianCalendarConverter" Version="1.2.0" />
paket add EthiopianCalendarConverter --version 1.2.0
#r "nuget: EthiopianCalendarConverter, 1.2.0"
// Install EthiopianCalendarConverter as a Cake Addin #addin nuget:?package=EthiopianCalendarConverter&version=1.2.0 // Install EthiopianCalendarConverter as a Cake Tool #tool nuget:?package=EthiopianCalendarConverter&version=1.2.0
Ethiopian Calendar Converter
Overview
Ethiopian Calendar Converter is a .NET library that provides methods to convert and manipulate dates in the Ethiopian and Gregorian calendars. It allows you to easily convert dates from GC to EC and perform various date-related calculations.
Installation
You can install the Ethiopian Calendar Converter library via NuGet. To install the package, run the following command in the Package Manager Console:
PM> Install-Package EthiopianCalendarConverter
Usage
Initializing Ethiopian Calendar
To start using the Ethiopian Calendar Converter, you need to create an instance of the EthiopianCalendar
class by providing a date in the Gregorian calendar.
using EthiopianCalendarConverter;
// ...
DateTime gregorianDate = new DateTime(2023, 1, 1);
EthiopianCalendar ethiopianCalendar = new EthiopianCalendar(gregorianDate);
Converting Dates
The EthiopianCalendar class
provides methods to convert dates between the Gregorian and Ethiopian calendars and to display different properties of the date.
Gregorian to Ethiopian
DateTime gregorianDate = new DateTime(2023, 1, 1);
string ethiopianDate = ethiopianCalendar.Date(); // Output: "2015-04-23"
"
Date Information
The EthiopianCalendar class also allows you to retrieve various date-related information.
int year = ethiopianCalendar.Year(); // Output: 2015
int month = ethiopianCalendar.Month(); // Output: 4
int day = ethiopianCalendar.Day(); // Output: 23
int quarter = ethiopianCalendar.Quarter(); // Output: 2
string monthName = ethiopianCalendar.MonthName(); // Output: "ታኅሣሥ"
string weekDay = ethiopianCalendar.WeekDay(); // Output: "እሑድ"
bool isLeapYear = ethiopianCalendar.IsLeapYear(); // Output: true
int fiscalYear = ethiopianCalendar.FiscalYear(); // Output: 2014
int fiscalMonth = ethiopianCalendar.FiscalMonth(); // Output: 10
License
This project is licensed under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.