put in ignore file
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
namespace FamilyTreeAPI.Helper
|
||||
{
|
||||
public class Helpers
|
||||
{
|
||||
public static string? DateToStr(DateTime? date)
|
||||
{
|
||||
string? result = null;
|
||||
if (date.HasValue)
|
||||
{
|
||||
result = date.Value.ToString("yyyy-MM-dd");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public static DateTime? DateToDateTime(string? date)
|
||||
{
|
||||
DateTime? result = null;
|
||||
if (!string.IsNullOrEmpty(date))
|
||||
{
|
||||
DateTime dt;
|
||||
if (DateTime.TryParse(date, out dt))
|
||||
{
|
||||
result = dt;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user