Skip to content

Commit 6075a6a

Browse files
Add CToT2 and TToC2 for datetime collections
1 parent b8e5f9f commit 6075a6a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2850,6 +2850,15 @@ internal static DateTime CToDT2(string jsonDate, IGxContext context) {
28502850
return CToD2(jsonDate);
28512851
}
28522852
}
2853+
public static GxSimpleCollection<DateTime> CToT2(GxSimpleCollection<string> stCollection, IGxContext context)
2854+
{
2855+
GxSimpleCollection<DateTime> dtCollection = new GxSimpleCollection<DateTime>();
2856+
foreach(string st in stCollection)
2857+
{
2858+
dtCollection.Add(CToT2(st, context));
2859+
}
2860+
return dtCollection;
2861+
}
28532862
public static DateTime CToT2(string value, IGxContext context)
28542863
{
28552864
if (isNullJsonDate(value))
@@ -2890,6 +2899,16 @@ public static string TToC2(DateTime dt, IGxContext context)
28902899
{
28912900
return TToC2(dt, true, context);
28922901
}
2902+
public static GxSimpleCollection<string> TToC2(GxSimpleCollection<DateTime> dtCollection, IGxContext context)
2903+
{
2904+
GxSimpleCollection<string> stCollection = new GxSimpleCollection<string>();
2905+
foreach(DateTime dt in dtCollection)
2906+
{
2907+
stCollection.Add(TToC2(dt, true, context));
2908+
}
2909+
return stCollection;
2910+
}
2911+
28932912
//[Obsolete("TToC2 is deprecated, use TToC2(DateTime, bool, IGxContext) instead", false)]
28942913
public static string TToC2(DateTime dt, bool toUTC)
28952914
{

0 commit comments

Comments
 (0)