Fix Waagen
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
using System;
|
||||
|
||||
namespace Elwig.Helpers.Weighing {
|
||||
/// <summary>
|
||||
/// Result of a weighing process on an industrial scale
|
||||
@ -16,17 +18,17 @@ namespace Elwig.Helpers.Weighing {
|
||||
/// <summary>
|
||||
/// Date string provided by the scale
|
||||
/// </summary>
|
||||
public string? Date = null;
|
||||
public DateOnly? Date = null;
|
||||
|
||||
/// <summary>
|
||||
/// Time string provided by the scale
|
||||
/// </summary>
|
||||
public string? Time = null;
|
||||
public TimeOnly? Time = null;
|
||||
|
||||
/// <returns><Weight/WeighingId/Date/Time></returns>
|
||||
override public string ToString() {
|
||||
var w = Weight != null ? $"{Weight}kg" : "";
|
||||
return $"<{w}/{WeighingId}/{Date}/{Time}>";
|
||||
return $"<{w}/{WeighingId}/{Date:yyyy-MM-dd}/{Time:HH:mm}>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user