diff --git a/EDILibrary/EdifactFormatVersion.cs b/EDILibrary/EdifactFormatVersion.cs index 67c58c7..d8b776e 100644 --- a/EDILibrary/EdifactFormatVersion.cs +++ b/EDILibrary/EdifactFormatVersion.cs @@ -355,9 +355,10 @@ public class EdifactFormatVersionHelper : IEdifactFormatVersionProvider private static readonly DateTime KeyDate2310 = new(2023, 09, 30, 22, 0, 0, DateTimeKind.Utc); /// - /// validity date of + /// validity date of /// - private static readonly DateTime KeyDate2404 = new(2024, 03, 31, 22, 0, 0, DateTimeKind.Utc); + /// Note that this is _not_ April 1st + private static readonly DateTime KeyDate2404 = new(2024, 04, 02, 22, 0, 0, DateTimeKind.Utc); public EdifactFormatVersion GetFormatVersion(DateTimeOffset keydate) { if (keydate >= KeyDate2404) diff --git a/EDILibraryTests/EdifactFormatVersionTests.cs b/EDILibraryTests/EdifactFormatVersionTests.cs index 2bd576d..dec719d 100644 --- a/EDILibraryTests/EdifactFormatVersionTests.cs +++ b/EDILibraryTests/EdifactFormatVersionTests.cs @@ -157,7 +157,8 @@ public void TestFV2110() Assert.AreEqual(EdifactFormatVersion.FV2110, versionProvider.GetFormatVersion(new DateTimeOffset(2022, 9, 30, 21, 59, 59, TimeSpan.Zero))); Assert.AreEqual(EdifactFormatVersion.FV2210, versionProvider.GetFormatVersion(new DateTimeOffset(2022, 9, 30, 22, 0, 0, TimeSpan.Zero))); Assert.AreEqual(EdifactFormatVersion.FV2310, versionProvider.GetFormatVersion(new DateTimeOffset(2023, 9, 30, 22, 0, 0, TimeSpan.Zero))); - Assert.AreEqual(EdifactFormatVersion.FV2404, versionProvider.GetFormatVersion(new DateTimeOffset(2024, 3, 31, 22, 0, 0, TimeSpan.Zero))); + Assert.AreEqual(EdifactFormatVersion.FV2310, versionProvider.GetFormatVersion(new DateTimeOffset(2024, 3, 31, 22, 0, 0, TimeSpan.Zero))); + Assert.AreEqual(EdifactFormatVersion.FV2404, versionProvider.GetFormatVersion(new DateTimeOffset(2024, 4, 2, 22, 0, 0, TimeSpan.Zero))); } } }