Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/przbadu/nepalidateconverter.net
C# Class library for nepali date converter, with NUnit testing framework
https://github.com/przbadu/nepalidateconverter.net
asp-net class-library csharp nepali-date nepali-date-converter
Last synced: 2 months ago
JSON representation
C# Class library for nepali date converter, with NUnit testing framework
- Host: GitHub
- URL: https://github.com/przbadu/nepalidateconverter.net
- Owner: przbadu
- License: mit
- Created: 2017-08-12T06:30:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-01T03:36:54.000Z (over 2 years ago)
- Last Synced: 2024-11-03T12:07:53.017Z (2 months ago)
- Topics: asp-net, class-library, csharp, nepali-date, nepali-date-converter
- Language: C#
- Homepage: https://www.nuget.org/packages/NepaliDateConverter.Net
- Size: 43.9 KB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/przbadu/NepaliDateConverter.Net.svg?branch=master)](https://travis-ci.org/przbadu/NepaliDateConverter.Net.svg?branch=master)
[![NuGet](https://img.shields.io/nuget/v/NepaliDateConverter.Net.svg)](https://www.nuget.org/packages/NepaliDateconverter.Net)# Unmaintained!!!
# NepaliDateConverter.Net
C# Class library for nepali date converter, with NUnit testing framework
## Installation
### Option 1
Download [Latest Release](https://github.com/przbadu/NepaliDateConverter.Net/releases) extract zip file and include `NepaliDateConverter.dll` file to your project reference.
### Option 2
You can install [https://www.nuget.org/packages/NepaliDateConverter.Net](https://www.nuget.org/packages/NepaliDateConverter.Net)package using Nuget package manger.
> Please use version `>= 2.x`
```sh
Install-Package NepaliDateConverter.Net
```## Usage
Convert English Date to Nepali Date
```cs
DateConverter converter = DateConverter.ConvertToNepali(2017, 1, 6);
converter.Year // => 2073
converter.Month // => 9
converter.Day // => 22
converter.WeekDayName // => Friday
converter.MonthName // => Poush
converter.WeekDay // => 6
```convert B.S to A.D
```cs
DateConverter converter = DateConverter.ConvertToEnglish(2073, 9, 22);
converter.Year // => 2017
converter.Month // => 1
converter.Day //=> 6
converter.WeekDayName // => Friday
converter.MonthName // => January
converter.WeekDay // => 6
```## TODO
* Add more specs
## Gotcha
Till now, we can only convert date from 2000 to 2033 B.S (nepali date).
## Development
* Fork this repository to your github account; And/Or clone it.
* And then open it in your `Visual Studio` IDE.
* Right click on Solution from Project Explorer and then select `Rebuild` Solution.
* It will download all required packages from Nuget package manager.
* Run `NUnit` test project to make sure everyting is green## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/NepaliDateConverter.Net. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
# References
* [Ruby Gem](https://github.com/przbadu/nepali_date_converter)
* [C# Class Library](https://github.com/przbadu/NepaliDateConverter.Net)## License
The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).