عکس hootanht
Persian Data Library is a library that can be converted Gregorian (Milady) year to Solar Hijri (Shamsi) year in the simplest way!C#
موضوع‌ها
۰
فورک‌ها
۰
ستاره‌ها
۸
تاریخ ایجاد
۳ بهمن ۱۳۹۸
آخرین بروزرسانی
۳ ماه قبل

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.2

Persian Date Public Version

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

Cross Platform

Platform Supported Version
.NET Framework 4.6.1 Or Higher
.NET Standard 2.0 Or Higher
.NET Core 2.0 Or Higher
Mono 5.4 Or Higher
Xamarin.iOS 10.14 Or Higher
Xamarin.Mac 3.8 Or Higher
Xamarin.Android 8.0 Or Higher
Universal Windows Platform (UWP) 10.0.16299 Or Higher
Unity 2018.1 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.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