Saxonite v1.1.0
This commit is contained in:
@@ -188,7 +188,7 @@ namespace Sarand.Net.Standard.Base.Bus
|
||||
if (Changed) return;
|
||||
Changed = ((int)(oldValue as IConvertible) != (int)(newValue as IConvertible));
|
||||
}
|
||||
protected void CheckChanged (int oldValue, int newValue)
|
||||
protected void CheckChanged (long oldValue, long newValue)
|
||||
{
|
||||
if (Changed) return;
|
||||
Changed = (oldValue != newValue);
|
||||
|
||||
@@ -10,6 +10,10 @@ namespace Sarand.Net.Standard.Base.Utils
|
||||
{
|
||||
//-------------------------------------------------------------------------
|
||||
// Definitions.
|
||||
public static String Format_SqlDate { get; } = "yyyy-MM-dd";
|
||||
public static String Format_SqlTime { get; } = "HH:mm:ss.fff";
|
||||
public static String Delim_SqlTime { get; } = " ";
|
||||
public static String Format_SqlDateTime { get; } = Format_SqlDate + Delim_SqlTime + Format_SqlTime;
|
||||
public static String Format_XmlDate { get; } = "yyyy-MM-dd";
|
||||
public static String Format_XmlTime { get; } = "HH:mm:ss";
|
||||
public static String Delim_XmlTime { get; } = "T";
|
||||
@@ -571,19 +575,36 @@ namespace Sarand.Net.Standard.Base.Utils
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Format as SQL date: 'yyyy-MM-dd'</summary>
|
||||
public static String FormatSqlDate(this DateTime value)
|
||||
{
|
||||
return Format(value, Format_SqlDate);
|
||||
}
|
||||
/// <summary>Format as SQL time: 'HH:mm:ss'</summary>
|
||||
public static String FormatSqlTime(this DateTime value)
|
||||
{
|
||||
return Format(value, Format_SqlTime);
|
||||
}
|
||||
/// <summary>Format as SQL datetime: 'yyyy-MM-ddTHH:mm:ss'</summary>
|
||||
public static String FormatSqlDateTime(this DateTime value)
|
||||
{
|
||||
return Format(value, Format_SqlDateTime);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Format as XML date: 'yyyy-MM-dd'</summary>
|
||||
public static String FormatXmlDate (this DateTime value)
|
||||
public static String FormatXmlDate(this DateTime value)
|
||||
{
|
||||
return Format(value, Format_XmlDate);
|
||||
}
|
||||
/// <summary>Format as XML time: 'HH:mm:ss'</summary>
|
||||
public static String FormatXmlTime (this DateTime value)
|
||||
public static String FormatXmlTime(this DateTime value)
|
||||
{
|
||||
return Format(value, Format_XmlTime);
|
||||
}
|
||||
/// <summary>Format as XML datetime: 'yyyy-MM-ddTHH:mm:ss'</summary>
|
||||
public static String FormatXmlDateTime (this DateTime value)
|
||||
public static String FormatXmlDateTime(this DateTime value)
|
||||
{
|
||||
return Format(value, Format_XmlDateTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user