NepaliCalendarToolkit 1.0.1

dotnet add package NepaliCalendarToolkit --version 1.0.1
                    
NuGet\Install-Package NepaliCalendarToolkit -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NepaliCalendarToolkit" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NepaliCalendarToolkit" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="NepaliCalendarToolkit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NepaliCalendarToolkit --version 1.0.1
                    
#r "nuget: NepaliCalendarToolkit, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=NepaliCalendarToolkit&version=1.0.1
                    
Install NepaliCalendarToolkit as a Cake Addin
#tool nuget:?package=NepaliCalendarToolkit&version=1.0.1
                    
Install NepaliCalendarToolkit as a Cake Tool

NepaliCalendarToolkit

This document provides an overview of the NepaliCalendarConverter class, detailing its methods, their implementations, and sample responses.

dotnet add package NepaliCalendarToolkit 

Methods

1. ConvertToNepali

Description: Converts date in AD (DateTime) to a Nepali date (NepaliDate).

Implementation:

DateTime dateInAD = new DateTime(2024, 10, 1);
NepaliDate nepaliDate = NepaliCalendarConverter.ConvertToNepali(dateInAD);

Response:

{
  "Year": 2081,
  "Month": 6,
  "Day": 15
}

2. ConvertToAD

Description: Converts a Nepali date (NepaliDate) to a Gregorian date (DateTime).

Implementation:

csharp
NepaliDate nepaliDate = new NepaliDate { Year = 2080, Month = 6, Day = 15 };
DateTime dateInAD = NepaliCalendarConverter.ConvertToAD(nepaliDate);

2023-10-01 00:00:00

3. GetStartAndEndDateInAD

Description: Retrieves the start and end dates in AD for a given Nepali year and month.

Implementation:

var dateRange = NepaliCalendarConverter.GetStartAndEndDateInAD(2080, 6);

Response:

{
  "StartDate": "2023-09-17",
  "EndDate": "2023-10-16"
}

4. GetQuarterDateRangeInAD

Description: Retrieves the start and end dates in AD for a given Nepali year and quarter.

Implementation:

var quarterRange = NepaliCalendarConverter.GetQuarterDateRangeInAD(2080, 1);

Response:

{
  "StartDate": "2023-07-01",
  "EndDate": "2023-09-30"
}

5. GetMonthRangeDateInAD

Description: Retrieves the start and end dates in AD for a specified range of Nepali months.

Implementation:

var monthRange = NepaliCalendarConverter.GetMonthRangeDateInAD(2080, 6, 8);

Response:

{
  "StartDate": "2023-09-17",
  "EndDate": "2023-11-15"
}

6. GetHolidaysAndWeekends

Description: Retrieves a list of holidays and weekends for a specified year and optional month.

Implementation:

var holidays = NepaliCalendarConverter.GetHolidaysAndWeekends(2080);

Response:

List<HolidayInfo> { ... } // Contains holiday information for the year 2080
{
  "Holidays": [
    {
      "Date": "2023-09-17",
      "Day": "Sunday",
      "Holiday": "Constitution Day"
    },
    {
      "Date": "2023-10-01",
      "Day": "Sunday",
      "Holiday": "Ghatasthapana"
    },
    {
      "Date": "2023-10-11",
      "Day": "Wednesday",
      "Holiday": "Fulpati"
    },
    {
      "Date": "2023-10-15",
      "Day": "Sunday",
      "Holiday": "Maha Asthami"
    },
    {
      "Date": "2023-10-16",
      "Day": "Monday",
      "Holiday": "Maha Navami"
    },
    {
      "Date": "2023-10-17",
      "Day": "Tuesday",
      "Holiday": "Vijaya Dashami"
    },
    {
      "Date": "2023-10-18",
      "Day": "Wednesday",
      "Holiday": "Ekadashi"
    },
    {
      "Date": "2023-10-19",
      "Day": "Thursday",
      "Holiday": "Dwadashi"
    },
    {
      "Date": "2023-10-20",
      "Day": "Friday",
      "Holiday": "Kojagrat Purnima"
    },
    {
      "Date": "2023-10-21",
      "Day": "Saturday",
      "Holiday": "Tihar"
    },
    {
      "Date": "2023-10-22",
      "Day": "Sunday",
      "Holiday": "Tihar"
    },
    {
      "Date": "2023-10-23",
      "Day": "Monday",
      "Holiday": "Tihar"
    },
    {
      "Date": "2023-10-24",
      "Day": "Tuesday",
      "Holiday": "Tihar"
    },
    {
      "Date": "2023-10-25",
      "Day": "Wednesday",
      "Holiday": "Tihar"
    },
    {
      "Date": "2023-10-26",
      "Day": "Thursday",
      "Holiday": "Tihar"
    }
  ]
}
## Release Notes
### Version main
Released on 
## Release Notes
### Version main
Released on 
## Release Notes
### Version main
Released on 
## Release Notes
### Version main
Released on 
Product 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 is compatible.  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 is compatible. 
.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net9.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.

Version Downloads Last updated
1.0.1 188 3/3/2025
1.0.0 109 3/2/2025

Initial release.