C# Класс PdfRpt.Core.Helper.PersianDate

Persian Date Converter
Показать файл Открыть проект

Открытые методы

Метод Описание
Find1StDayOfMonth ( int year, int monthIndex, CalendarType calendarType = CalendarType.PersianCalendar ) : int

Finds 1st day of the given year and month.

FixWeakCharacters ( this data ) : string

If you see dd/mm/yyy instead of yyyy/mm/dd in your RTL reports, use this method to fix it.

HijriToGregorian ( int inYear, int inMonth, int inDay, int &outYear, int &outMonth, int &outDay ) : void

Converts Hijri date To Gregorian date.

IsLeapYear ( this year, CalendarType calendarType = CalendarType.PersianCalendar ) : bool

Is a given year leap?

ToPersianDateTime ( this gregorianDate, string dateSeparator = "/", bool includeHourMinute = true, bool showLeftAlignedHourMinute = true, string timeSeparator = ":" ) : string

Converts Gregorian date to Shamsi/Persian date

Описание методов

Find1StDayOfMonth() публичный статический Метод

Finds 1st day of the given year and month.
public static Find1StDayOfMonth ( int year, int monthIndex, CalendarType calendarType = CalendarType.PersianCalendar ) : int
year int
monthIndex int
calendarType CalendarType
Результат int

FixWeakCharacters() публичный статический Метод

If you see dd/mm/yyy instead of yyyy/mm/dd in your RTL reports, use this method to fix it.
public static FixWeakCharacters ( this data ) : string
data this string data
Результат string

HijriToGregorian() публичный статический Метод

Converts Hijri date To Gregorian date.
public static HijriToGregorian ( int inYear, int inMonth, int inDay, int &outYear, int &outMonth, int &outDay ) : void
inYear int
inMonth int
inDay int
outYear int
outMonth int
outDay int
Результат void

IsLeapYear() публичный статический Метод

Is a given year leap?
public static IsLeapYear ( this year, CalendarType calendarType = CalendarType.PersianCalendar ) : bool
year this
calendarType CalendarType
Результат bool

ToPersianDateTime() публичный статический Метод

Converts Gregorian date to Shamsi/Persian date
public static ToPersianDateTime ( this gregorianDate, string dateSeparator = "/", bool includeHourMinute = true, bool showLeftAlignedHourMinute = true, string timeSeparator = ":" ) : string
gregorianDate this Gregorian date
dateSeparator string Defines an optional separator between date's parts. Its default value is /
includeHourMinute bool Should converter include hour and minutes in final result. Its default value is true
showLeftAlignedHourMinute bool If includeHourMinute is true, indicates whether to show hh:mm yyyy/mm/dd or yyyy/mm/dd hh:mm
timeSeparator string Defines an optional separator between time's parts. Its default value is :
Результат string