This check isn’t needed if you force it to have more characters, then take last 4:
(last 4 of ("0000" & item 0 of it), last 4 of ("0000" & item 1 of it)) of ( ("800", "930"); ("1430", "1500") )
This is adapted from @brolly33 's answer, but keeping more right to left relevance, slightly more plurals, and simplified IF/THEN/ELSE:
(if it < 0 * minute then it + 1 * day else it) of (item 1 of it - item 0 of it) of ( ( (it as integer * hour) of first 2 of it + (it as integer * minute) of last 2 of it ) of lasts 4 of ("0000" & item 0 of it), ( (it as integer * hour) of first 2 of it + (it as integer * minute) of last 2 of it ) of lasts 4 of ("0000" & item 1 of it)) of ( ("800", "930"); ("1430", "1500"); ("2300", "0100") )
Then, using this to get the raw data from the registry: (this part could be swapped out for session relevance to read client properties with the same values in a web report or dashboard)
((it as string) of values "WindowStart" of it, (it as string) of values "WindowEnd" of it) of keys "HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot" of native registries
That then should be:
(if it < 0 * minute then it + 1 * day else it) of (item 1 of it - item 0 of it) of ( ( (it as integer * hour) of first 2 of it + (it as integer * minute) of last 2 of it ) of lasts 4 of ("0000" & item 0 of it), ( (it as integer * hour) of first 2 of it + (it as integer * minute) of last 2 of it ) of lasts 4 of ("0000" & item 1 of it)) of ((it as string) of values "WindowStart" of it, (it as string) of values "WindowEnd" of it) of keys "HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot" of native registries
Then to convert into minutes, just add (it / minute) of
to it:
(it / minute) of (if it < 0 * minute then it + 1 * day else it) of (item 1 of it - item 0 of it) of ( ( (it as integer * hour) of first 2 of it + (it as integer * minute) of last 2 of it ) of lasts 4 of ("0000" & item 0 of it), ( (it as integer * hour) of first 2 of it + (it as integer * minute) of last 2 of it ) of lasts 4 of ("0000" & item 1 of it)) of ((it as string) of values "WindowStart" of it, (it as string) of values "WindowEnd" of it) of keys "HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot" of native registries
The advantage to structuring the relevance this way is that you can actually use this as session relevance if you have client properties that report the start and end and swap that out for reading from the registry. Plus you can switch between reporting the values as minutes or as duration just by adding or removing (it/minute) of
from the front.
In the case of a web report, you might even want to display both the duration as hours:minutes as well as duration in minutes, with the addition of (it, it/minute) of
(it, it / minute) of (if it < 0 * minute then it + 1 * day else it) of (item 1 of it - item 0 of it) of ( ( (it as integer * hour) of first 2 of it + (it as integer * minute) of last 2 of it ) of lasts 4 of ("0000" & item 0 of it), ( (it as integer * hour) of first 2 of it + (it as integer * minute) of last 2 of it ) of lasts 4 of ("0000" & item 1 of it)) of ( ("800", "930"); ("1430", "1500"); ("2300", "0100") )
There is really 3 parts to this kind of relevance: first, to read the raw data, second, to parse it, third, to display it in a final form. Ideally you can swap out any of these parts separately from the others in order to read the same data from a different source (cross platform, or session relevance, or hard coded test values) or to parse the same data differently, or to display it differently. If the relevance is structured the way I have done it, then the reading of the raw data is always on the right side, the parsing in the middle, and the changing the values for display(or use) on the left (turning duration into minutes). This is a (complicated) example of why I recommend that relevance always flow from right to left.
Also, these 2 relevances are equivalent:
( it whose(it > 0 * minute) | (it + 1 * day) ) of
(if it < 0 * minute then it + 1 * day else it) of
For no real reason, this relevance will take a start time and a duration and return an end time:
(it whose(it < 1*day) | (it - 1*day) ) of ( item 1 of it as integer * minute + ( (it as integer * hour) of first 2 of it + (it as integer * minute) of last 2 of it ) of last 4 of ("0000" & item 0 of it) ) of ( ("800", "30") ; ("2300", "90") )