This commit is contained in:
2020-12-28 15:35:06 +00:00
parent 5160a2ef4a
commit 18cba543a4

View File

@@ -342,7 +342,7 @@ namespace AyaNova.PlugIn.V8
/////////////////////////////// ///////////////////////////////
// v7 to v8 Date conversion // v7 to v8 Date conversion
// //NOTE: ensure null for empty date
// //
public static string DateToV8(object o, bool neverEmpty = false) { return DateToV8(o.ToString(), neverEmpty); } public static string DateToV8(object o, bool neverEmpty = false) { return DateToV8(o.ToString(), neverEmpty); }
public static string DateToV8(string s, bool neverEmpty = false) public static string DateToV8(string s, bool neverEmpty = false)
@@ -355,7 +355,7 @@ namespace AyaNova.PlugIn.V8
} }
else else
{ {
return string.Empty; return null;
} }
} }
@@ -366,7 +366,7 @@ namespace AyaNova.PlugIn.V8
//couldn't be parsed //couldn't be parsed
if (neverEmpty) if (neverEmpty)
return DateTime.UtcNow.ToString("o"); return DateTime.UtcNow.ToString("o");
return string.Empty; return null;
} }
/////////////////////////////// ///////////////////////////////