5 ms·
I would create a lookup table with 336 entries for every (year%28+month) https://en.wikipedia.org/wiki/Solar_cycle_(calendar) https://en.wikipedia.org/wiki/Sol
by adontz 5y ago
I would create a lookup table with 336 entries for every (year%28+month)
https://en.wikipedia.org/wiki/Solar_cycle_(calendar) https://en.wikipedia.org/wiki/Solar_cycle_(calendar)
336 bytes. Even 168 bytes because half byte is 16 values and we need only 7, so pack two answers in one byte. Even 126 bytes if we pack blocks of 3 bits. Seem reasonable even for embedded.
- chrisoverzero 5y agoHow would you do that in the Shortcuts app?
- adontz 5y agoI'm not familiar with Shortcuts at all, but is not this related? https://help.apple.com/workflow/#/apd142384946 https://help.apple.com/workflow/#/apd142384946