Skip to content

Commit

Permalink
Fix whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamTheCoder authored Nov 9, 2024
1 parent 565886f commit cfcd020
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CodeConverter/CSharp/LiteralConversions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ public static ExpressionSyntax GetLiteralExpression(object value, string textFor
return SyntaxFactory.LiteralExpression(CSSyntaxKind.CharacterLiteralExpression, SyntaxFactory.Literal(c));
case DateTime dt:
{
var valueToOutput = dt.Date.Equals(dt) ? dt.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture) : dt.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
return SyntaxFactory.ParseExpression("DateTime.Parse(\"" + valueToOutput + "\")");
}
var valueToOutput = dt.Date.Equals(dt) ? dt.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture) : dt.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
return SyntaxFactory.ParseExpression("DateTime.Parse(\"" + valueToOutput + "\")");
}
default:
throw new ArgumentOutOfRangeException(nameof(value), value, null);
}
Expand Down Expand Up @@ -206,4 +206,4 @@ private static (string textForUser, ExpressionSyntax MaybeFullExpression) Conver

return (textForUser, null);
}
}
}

0 comments on commit cfcd020

Please sign in to comment.