23 lines
614 B
C#
23 lines
614 B
C#
![]() |
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();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|