Skip to content

Commit

Permalink
Do correct luxon Duration deserialization (#1315)
Browse files Browse the repository at this point in the history
Co-authored-by: Rico Suter <mail@rsuter.com>
  • Loading branch information
gregfullman and RicoSuter authored Feb 16, 2021
1 parent 81d79c4 commit bde6b57
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ private static string GetStringToDateTime(DataConversionParameters parameters, J
return "";

case TypeScriptDateTimeType.Luxon:
if (typeSchema.Format == JsonFormatStrings.TimeSpan)
{
return "Duration.fromISO";
}
return "DateTime.fromISO";

case TypeScriptDateTimeType.DayJS:
Expand Down

0 comments on commit bde6b57

Please sign in to comment.