3 ms·
I've been looking at the calendar and date types for BACnet, which is a protocol used in building automation (and hence, scheduling is super-important) - one of
by epaulson 5y ago
I've been looking at the calendar and date types for BACnet, which is a protocol used in building automation (and hence, scheduling is super-important) - one of the things that it's got is some nice support for repeating dates/date patterns, sort of like cron but with odd extensions. (Because you might want to run a fan or purge a storage tank on specific days)
For example, month is a number between 1 and 14, where 1 through 12 are Jan-Dec, but a month of '13' means "Odd Months" and month '14' means 'Even Months', and there's an explicit 'Not specified' for things you might want to run every month.
Similarly there are special values for 'Even Days' and 'Odd Days', and special values for Week of Month: 1-7(1), 8-14(2), 15-21(3), 22-28(4), 29-31(5), 'Last 7 Days of the month'(6), and 'Unspecified'(255)
I like that there's nice compact and standard ways to express and serialize these common choices. I wish there was something like that included in temporal but it doesn't look like there is?