We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f9c180 commit c8a99c0Copy full SHA for c8a99c0
1 file changed
src/SmartFormat.Tests/Extensions/ReflectionSourceTests.cs
@@ -21,6 +21,19 @@ private static object[] GetArgs()
21
};
22
}
23
24
+#if NET
25
+ [Test]
26
+ public void DateOnly_TimeOnly()
27
+ {
28
+ var date = new DateOnly(2023, 12, 31);
29
+ var time = new TimeOnly(23, 45, 56);
30
+
31
+ var result = Smart.Format("{0:dd.MM.yyyy} - {1:HH\\:mm\\:ss}", date, time);
32
33
+ Assert.That(result, Is.EqualTo("31.12.2023 - 23:45:56"));
34
+ }
35
+#endif
36
37
[Test]
38
public void Test_Properties()
39
{
@@ -280,4 +293,4 @@ internal class TestReflectionSource : ReflectionSource
280
293
281
294
public static string TypeCacheFieldName => nameof(TypeCache);
282
295
283
-}
296
+}
0 commit comments