Expose IecMinDate and IecMaxDate as properties

This commit is contained in:
bonk-dev
2023-08-23 12:03:22 +02:00
committed by GitHub
parent e4cc42fa51
commit f227ad4b53

View File

@@ -11,7 +11,7 @@ namespace S7.Net.Types
/// <summary> /// <summary>
/// Minimum allowed date for the IEC date type /// Minimum allowed date for the IEC date type
/// </summary> /// </summary>
public static readonly System.DateTime IecMinDate = new(year: 1990, month: 01, day: 01); public static System.DateTime IecMinDate { get; } = new(year: 1990, month: 01, day: 01);
/// <summary> /// <summary>
/// Maximum allowed date for the IEC date type /// Maximum allowed date for the IEC date type
@@ -20,7 +20,7 @@ namespace S7.Net.Types
/// WORD max value - 65535) /// WORD max value - 65535)
/// </remarks> /// </remarks>
/// </summary> /// </summary>
public static readonly System.DateTime IecMaxDate = new(year: 2169, month: 06, day: 06); public static System.DateTime IecMaxDate { get; } = new(year: 2169, month: 06, day: 06);
private static readonly ushort MaxNumberOfDays = (ushort)(IecMaxDate - IecMinDate).TotalDays; private static readonly ushort MaxNumberOfDays = (ushort)(IecMaxDate - IecMinDate).TotalDays;
@@ -79,4 +79,4 @@ namespace S7.Net.Types
return values; return values;
} }
} }
} }