Created
November 29, 2020 08:55
-
-
Save peymanmajidi/0ad639ef4f8f6e6a8c6f79ef229438e2 to your computer and use it in GitHub Desktop.
DateTime To Shamsi(Persian/Iran) Format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string ToShamsi(this DateTime value) | |
{ | |
PersianCalendar pc=new PersianCalendar(); | |
return pc.GetYear(value) + "/" + pc.GetMonth(value).ToString("00") + "/" + | |
pc.GetDayOfMonth(value).ToString("00"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment