DTLib/DTLib/MyTimeFormat.cs
2022-08-17 03:59:40 +06:00

12 lines
297 B
C#

namespace DTLib;
public class MyTimeFormat : IFormatProvider
{
public static MyTimeFormat Instance=new();
public object GetFormat(Type formatType)
{
if(formatType==typeof(DateTime))
return "yyyy-MM-dd_HH-mm-ss+zz";
else throw new FormatException();
}
}