This commit is contained in:
mmrbnjd
2025-07-06 20:38:02 +03:30
parent 8b89957a93
commit 2432ab293f
3 changed files with 110 additions and 11 deletions

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Hushian.Application.Services
{
public static class ExMethod
{
public static string GetDatePersian(this DateTime d)
{
PersianCalendar pc = new PersianCalendar();
return string.Format("{0}/{1}/{2}", pc.GetYear(d), pc.GetMonth(d), pc.GetDayOfMonth(d));
}
public static string GetTime(this DateTime d)
{
return d.Hour.ToString() + ":" + d.Minute.ToString();
}
}
}