2
0
mirror of synced 2025-01-10 00:25:49 +00:00
2023-12-20 09:48:22 +01:00

25 lines
494 B
C#

namespace Utils
{
public class TimeRange
{
public TimeRange(DateTime from, DateTime to)
{
if (from < to)
{
From = from;
To = to;
}
else
{
From = to;
To = from;
}
Duration = To - From;
}
public DateTime From { get; }
public DateTime To { get; }
public TimeSpan Duration { get; }
}
}