mirror of
				https://github.com/nsnail/ns-ext.git
				synced 2025-10-31 23:15:28 +08:00 
			
		
		
		
	..
This commit is contained in:
		| @@ -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"); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user