Package Name | Target Framework | Version | Downloads |
---|---|---|---|
ZPersianDateTime | .NET 5.0;.NET .0;.NET 8.0 |
This is library for working with Date and it's instead of System.DateTime when need Jalali date in .net applications.
.net 5 and later
Nothing
Install-Package ZPersianDateTime -Version 0.0.4
or
Go to Nuget Page.
PersianDate persianDate = new DateTime(2019, 01, 13);
PersianDate persianDate = DateTime.Today;
DateTime date = new PersianDate(1397,10,23);
DateTime date = PersianDate.Today;
var date = new PersianDate(1397, 10, 23);
var bom = date.BeginOfMonth();
var bow = date.BeginOfWeek();
var boy = date.BeginOfYear();
var eom = date.EndOfMonth();
var eow = date.EndOfWeek();
var eoy = date.EndOfYear();
var newDay = new PersianDate(1397, 1, 1).GotoDays(10);
var newMonth = new PersianDate(1397, 1, 1).GotoMonths(1);
var newYear = new PersianDate(1397, 1, 1).GotoYears(1);
var newWeek = new PersianDate(1397, 1, 1).GotoWeeks(2);