Persian Date Convertor NuGet Package

string persianSampleDateString1 = "1393/08/01 21:53:26";
DateTime datetime1 = persianSampleDateString1.ToEn();

datetime1.ToFa();//1393/08/01
datetime1.ToFa("d");//93/08/01
datetime1.ToFa("D");//پنج شنبه, 01 آبان 1393
datetime1.ToFa("g");//93/08/01 21:53
datetime1.ToFa("G");//93/08/01 21:53:26
datetime1.ToFa("f");//1393/08/01 21:53
datetime1.ToFa("F");//پنج شنبه, 01 آبان 1393 ساعت 21:53:26
datetime1.ToFa("M");//اول آبان
datetime1.ToFa("y");//1393 آبان
datetime1.ToFa("yy MMM");//93 آبان
datetime1.ToFa("yyyy/MM/dd ");//1393/08/01
datetime1.ToFa("yy-M-dd ");//93-8-01
datetime1.ToFa("ddd d MMM yyyy");//جمعه 1 آبان 1393
datetime1.ToFa("ddd D MMM yyyy");//جمعه اول آبان 1393
"1393/08/01 21:00".ToEn().ToFa("YYYY/MM/dd hh:mm"));// "1393/08/01 21:00"
//default format
"1393/08/01 16:20".ToEn();//10/23/2014 4:20:00 PM
"01/8/1393".ToEn().ToShortDateString();//10/23/2014
"1/8/1393".ToEn().ToLongDateString();//Thursday, October 23, 2014
"1-8-93".ToEn().ToString("d");//10/23/2014
"93-8-01".ToEn().ToString("U");//Wednesday, October 22, 2014 8:30:00 PM
"93-8-01".ToEn().ToString("y");//October 2014
"93 8 01".ToEn().ToString("ddd d MMM yyyy");//Thu 23 Oct 2014
"1_8_1393 ".ToEn().ToString("g");//10/23/2014 12:00 AM
" 1_8_1393 16:20".ToEn().ToString("f");//Thursday, October 23, 2014 4:20 PM
" 1.8.1393 16:20:48".ToEn().ToString("R");//Thu, 23 Oct 2014 16:20:48 GMT.




Got any Persian Date Convertor Question?





Info

Version: 3.5.5
Author(s): Iman Abidi
Last Update: Saturday, January 13, 2018
.NET Fiddle: Create the first Fiddle
Project Url: https://github.com/imanabidi/PersianDate.NET
NuGet Url: https://www.nuget.org/packages/PersianDate


Install
Install-Package PersianDate
dotnet add package PersianDate
paket add PersianDate
PersianDate Download (Unzip the "nupkg" after downloading)



Tags



STATS

must-have-score

1.6

avg-downloads-per-day

7

days-since-last-release

2294