NepaliDateConverter.NETCORE
1.0.4
dotnet add package NepaliDateConverter.NETCORE --version 1.0.4
NuGet\Install-Package NepaliDateConverter.NETCORE -Version 1.0.4
<PackageReference Include="NepaliDateConverter.NETCORE" Version="1.0.4" />
paket add NepaliDateConverter.NETCORE --version 1.0.4
#r "nuget: NepaliDateConverter.NETCORE, 1.0.4"
// Install NepaliDateConverter.NETCORE as a Cake Addin #addin nuget:?package=NepaliDateConverter.NETCORE&version=1.0.4 // Install NepaliDateConverter.NETCORE as a Cake Tool #tool nuget:?package=NepaliDateConverter.NETCORE&version=1.0.4
NepaliDateConverter
NepaliDateConverter is a nuget package for .NETCore application that helps you to convert B.S. date to A.D. and vice versa.
Features:
- Convert BS dates to AD and vice versa
- Validate if the English dates & Nepali Dates are correct
- Check if the year is a leap year or not
Limatations:
- The date conversion is only available till the Year 2090 BS.
Installation
NepaliDateConverter requires .NET Core 2.2 +. Install it using the Nuget Manager or run the following command in Package Manager Console
$ Install-Package NepaliDateConverter.NETCORE
Class & Methods available
The package has two class available. They are as follows:
DateConverter
This class contains static methods which can be used to convert the dates. They are as follows:
Method | Parameters | Description |
---|---|---|
ConvertToNepali | int Year, int Month, int day | This method is used to convert AD dates to BS. |
ConvertToEnglish | int Year, int Month, int day | This method is used to convert BS dates to AD. |
The above methods will return object with following property:
Variable | Description |
---|---|
Year | Converted Year |
Month | Converted Month |
Day | Converted Day |
WeekDayName | Name of the day for the converted date |
MonthName | Name of the month for the converted date |
MonthName | Name of the month for the converted date |
WeekDay | Week day number for the converted date |
Calendar
This class contains methods to validate the dates. They are as follows:
Method | Parameters | Description |
---|---|---|
IsLeapYear | int Year | Returns in bool if the year is leap year or not. |
GetDayOfWeek | int WeekDayNumber | Returns the name of the day of the week. |
GetEnglishMonth | int Month Number | Returns the name of the english month for the provided month number. |
GetNepaliMonth | int Month Number | Returns the name of the nepali month for the provided month number. |
ValidEnglishDate | int Year, int Month, int day | Returns in bool if the enterted english date is valid or not |
ValidNepaliDate | int Year, int Month, int day | Returns in bool if the enterted nepali date is valid or not |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.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.
Upgraded the project to .NET Standard 2.0 along with Unit Tests.