Skip to content

Commit

Permalink
Expose IecMinDate and IecMaxDate as properties
Browse files Browse the repository at this point in the history
  • Loading branch information
bonk-dev authored Aug 23, 2023
1 parent e4cc42f commit f227ad4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions S7.Net/Types/Date.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static class Date
/// <summary>
/// Minimum allowed date for the IEC date type
/// </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>
/// Maximum allowed date for the IEC date type
Expand All @@ -20,7 +20,7 @@ public static class Date
/// WORD max value - 65535)
/// </remarks>
/// </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;

Expand Down Expand Up @@ -79,4 +79,4 @@ public static System.DateTime[] ToArray(byte[] bytes)
return values;
}
}
}
}

0 comments on commit f227ad4

Please sign in to comment.