hootanht / PersianDate

Persian Data Library is a library that can be converted Gregorian (Milady) year to Solar Hijri (Shamsi) year in the simplest way!

Home Page:https://www.nuget.org/packages/PersianDateShamsi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Persian Date Library

Persian Date Library

Persian Data Library is a library that can be convert Gregorian (Milady) year to Solar Hijri (Shamsi) year in simplest way!


Target Branch Version
Github master v1.0.4

Persian Date Public Version

Target Branch Version Download link Total downloads
Nuget master v1.0.4 NuGet NuGet downloads
Release master v1.0.4 Build Status

Cross Platform

Platform Supported Version
.NET 5.0 Or Higher

Code Example

PersianDateShamsi persianDateShamsi = new PersianDateShamsi();
    
    Console.WriteLine(persianDateShamsi.GetShamsiYear(DateTime.Now));
    //Result : 1398
    
    Console.WriteLine(persianDateShamsi.GetShamsiMonthName(DateTime.Now));
    //Result : بهمن
    
    Console.WriteLine(persianDateShamsi.GetShamsiDayString(DateTime.Now));
    //Result : 03
    
    Console.WriteLine(persianDateShamsi.GetShamsiDayName(DateTime.Now));
    //Result : پنجشنبه
    
    Console.WriteLine(persianDateShamsi.GetShamsiDayShortName(DateTime.Now));
    //Result : پ

Extension Method For DateTime

    Console.WriteLine(DateTime.Now.ToShamsiDate());
    //Result : 1398/11/03
    
    Console.WriteLine(DateTime.Now.ToShortShamsiDate());
    //Result : 98/11/03
    
    Console.WriteLine(DateTime.Now.ToLongShamsiDate());
    //Result : پنجشنبه 3 بهمن 1398

Version changes

Version 1.0.4

-Add support for .Net 5.0 and 6.0

Version 1.0.3

-Change .Net Standard 2.0 To .NET 7.0

Version 1.0.2

-Improve Flexibility

Version 1.0.1

-Change .Net Standard 2.1 To 2.0 To Support More Platforms

Developer Twitter Follow

Name Github Email Telegram
Hootan Hemmati @hootanht hootanhemmati@outlook.com https://t.me/hootanht

About

Persian Data Library is a library that can be converted Gregorian (Milady) year to Solar Hijri (Shamsi) year in the simplest way!

https://www.nuget.org/packages/PersianDateShamsi


Languages

Language:C# 100.0%