✨
This commit is contained in:
14
StopShopping.Services/Extensions/SystemExtensions.cs
Normal file
14
StopShopping.Services/Extensions/SystemExtensions.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace System;
|
||||
|
||||
public static class SystemExtensions
|
||||
{
|
||||
public static string ToFormatted(this DateTime dateTime)
|
||||
{
|
||||
return dateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
public static string ToFormatted(this DateOnly date)
|
||||
{
|
||||
return date.ToString("yyyy-MM-dd");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user