mirror of
https://github.com/nsnail/ns-ext.git
synced 2025-04-20 01:42:51 +08:00
..
This commit is contained in:
parent
81ba893f6e
commit
75f426105f
@ -52,30 +52,43 @@ public static class DateTimeExtensions
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static string yyyyMM(this DateTime me)
|
||||
{
|
||||
return me.ToString("yyyy-MM");
|
||||
return me.ToString("yyyyMM");
|
||||
}
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static string yyyyMMdd(this DateTime me)
|
||||
{
|
||||
return me.ToString("yyyyMMdd");
|
||||
}
|
||||
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static string yyyy_MM(this DateTime me)
|
||||
{
|
||||
return me.ToString("yyyy-MM");
|
||||
}
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static string yyyy_MM_dd(this DateTime me)
|
||||
{
|
||||
return me.ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static string yyyyMMddHHmm(this DateTime me)
|
||||
public static string yyyy_MM_dd_HH_mm(this DateTime me)
|
||||
{
|
||||
return me.ToString("yyyy-MM-dd HH:mm");
|
||||
}
|
||||
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static string yyyyMMddHHmmss(this DateTime me)
|
||||
public static string yyyy_MM_dd_HH_mm_ss(this DateTime me)
|
||||
{
|
||||
return me.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static string yyyyMMddHHmmssfff(this DateTime me)
|
||||
public static string yyyy_MM_dd_HH_mm_ss_fff(this DateTime me)
|
||||
{
|
||||
return me.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user