NepaliCalendar.Core 1.0.0

dotnet add package NepaliCalendar.Core --version 1.0.0
                    
NuGet\Install-Package NepaliCalendar.Core -Version 1.0.0
                    
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="NepaliCalendar.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NepaliCalendar.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="NepaliCalendar.Core" />
                    
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 NepaliCalendar.Core --version 1.0.0
                    
#r "nuget: NepaliCalendar.Core, 1.0.0"
                    
#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.
#:package NepaliCalendar.Core@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NepaliCalendar.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=NepaliCalendar.Core&version=1.0.0
                    
Install as a Cake Tool

NepaliCalendar.Core

🗓️ A .NET 8 library to convert between Gregorian (AD) and Nepali (Bikram Sambat - BS) dates.

Built for modern cross-platform .NET apps including Blazor, MAUI, Web APIs, and console apps.


✨ Features

  • 🔁 Convert AD → BS with AdToBs(DateTime adDate)
  • 🔁 Convert BS → AD with BsToAd(string bsDate)
  • 📦 Built for .NET 8
  • ⚡ Lightweight and dependency-free

📦 Installation

Install from NuGet:

dotnet add package NepaliCalendar.Core

Or via NuGet Package Manager:

Install-Package NepaliCalendar.Core

🚀 Usage

✅ AD → BS

using NepaliCalendar.Core;

var adDate = new DateTime(2025, 4, 17);
string bsDate = NepaliCalendarConverter.AdToBs(adDate);

Console.WriteLine($"BS Date: {bsDate}");
// Output: 2082/01/04 (example)

✅ BS → AD

using NepaliCalendar.Core;

var bsDate = "2082/01/04";
DateTime adDate = NepaliCalendarConverter.BsToAd(bsDate);

Console.WriteLine($"AD Date: {adDate:yyyy-MM-dd}");
// Output: 2025-04-17 (example)

🛠️ Requirements

  • .NET 8 SDK
  • Works on:
    • Console Apps
    • Web APIs
    • Blazor (Server/WebAssembly)
    • MAUI (Mobile/Desktop)

📁 Project Structure

NepaliCalendar.Core/
├── NepaliCalendarConverter.cs
├── README.md
├── LICENSE.txt
└── NepaliCalendar.Core.csproj

📜 License

MIT License © Binod Sapkota
See LICENSE.txt for details.


🤝 Contributing

PRs and feature requests are welcome!
Please fork the repo and submit a pull request.


🔗 Author

Binod Sapkota
📧 binod@riddhasoft.com
🏢 Riddha Soft Pvt Ltd
🔗 GitHub | LinkedIn

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has 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.0 206 4/17/2025