...
This commit is contained in:
22
Hushian.Application/Services/ExMethod.cs
Normal file
22
Hushian.Application/Services/ExMethod.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user