initial commit
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
using RTCSync.Utils;
|
||||
|
||||
namespace RTCSync.Models;
|
||||
|
||||
public class TimeModelBI
|
||||
{
|
||||
// 6 5 4 | 3 2 1 0
|
||||
// 10 Seconds | Seconds
|
||||
// 00 - 59
|
||||
public static BitIndex[] SecondsBI { get; } = [new(1, 0..3)];
|
||||
public static BitIndex[] TenSecondsBI { get; } = [new(1, 4..6)];
|
||||
|
||||
// 6 5 4 | 3 2 1 0
|
||||
// 10 Minutes | Minutes
|
||||
// 00 - 59
|
||||
public static BitIndex[] MinutesBI { get; } = [new(2, 0..3)];
|
||||
public static BitIndex[] TenMinutesBI { get; } = [new(2, 4..6)];
|
||||
|
||||
// 6 | 5 | 4 | 3 2 1 0
|
||||
// 12/24 | 20 hour | 10 hour | Hour
|
||||
// 1-12 + AM/PM
|
||||
// 00 - 23
|
||||
public static BitIndex[] HourBI { get; } = [new(3, 0..3)];
|
||||
public static BitIndex[] TenHourBI { get; } = [new(3, 4..4)];
|
||||
public static BitIndex[] TwentyHourBI { get; } = [new(3, 5..5)];
|
||||
// When high - 12 hour format is selected
|
||||
public static BitIndex[] HoursFormatBI { get; } = [new(3, 6..6)];
|
||||
|
||||
// 2 1 0
|
||||
// Day
|
||||
// 1 - 7
|
||||
// 1 = Saturday, 2 = Monday
|
||||
public static BitIndex[] DayOfWeekBI { get; } = [new(4, 0..3)];
|
||||
|
||||
// 5 4 | 3 2 1 0
|
||||
// 10 Date | Date
|
||||
// 01 - 31
|
||||
public static BitIndex[] DateBI { get; } = [new(5, 0..4)];
|
||||
public static BitIndex[] TenDateBI { get; } = [new(5, 4..5)];
|
||||
|
||||
// 7 | 4 | 3 2 1 0
|
||||
// Century | 10 Month | Month
|
||||
// 01 - 12 + Century
|
||||
public static BitIndex[] MonthBI { get; } = [new(6, 0..3)];
|
||||
public static BitIndex[] TenMonthBI { get; } = [new(6, 4..4)];
|
||||
// High when the years register overflows from 99 to 00
|
||||
public static BitIndex[] CenturyBI { get; } = [new(6, 7..7)];
|
||||
|
||||
// 7 6 5 4 | 3 2 1 0
|
||||
// 10 Year | Year
|
||||
// 0-99
|
||||
public static BitIndex[] YearBI { get; } = [new(7, 0..3)];
|
||||
public static BitIndex[] TenYearBI { get; } = [new(7, 4..7)];
|
||||
}
|
||||
Reference in New Issue
Block a user