PersianDate 3.5.3

.NET Standard 1.3 .NET Framework 3.5
There is a newer version of this package available.
See the version list below for details.
dotnet add package PersianDate --version 3.5.3
NuGet\Install-Package PersianDate -Version 3.5.3
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="PersianDate" Version="3.5.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PersianDate --version 3.5.3
#r "nuget: PersianDate, 3.5.3"
#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.
// Install PersianDate as a Cake Addin
#addin nuget:?package=PersianDate&version=3.5.3

// Install PersianDate as a Cake Tool
#tool nuget:?package=PersianDate&version=3.5.3

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

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
"1/8/1393".ToEn().ToLongDateString();//Thursday, October 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

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1
.NET Framework net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen30 tizen40 tizen60
Universal Windows Platform uap uap10.0
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 3.5

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on PersianDate:

Package Downloads

Package Description


Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.5.5 15,184 1/13/2018
3.5.4 904 1/12/2018
3.5.3 1,033 12/3/2017
2.1.8 2,399 9/29/2016
1.3.5 3,725 11/2/2014

- Adding extension mthods for Datetime and Datetime?
- Converting time in string back to georgian date
- adding persian long date of month string like بیست و یکم with D string format param