Files
Hushian/Hushian.Application/Services/ExMethod.cs

23 lines
614 B
C#
Raw Normal View History

2025-07-06 20:38:02 +03:30
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();
}
}
}