I'm interested in APL code to unpack a date packed to an integer day count using Gregorian calendar rules.
I asked a question a month or so ago for APL code to pack a date so I could calculate the count of days between dates (Convert date to day count). That worked great and now I'd like to store dates in this manner; however, that means I will need to unpack them.
I have attempted it but the logic has become a mess and I feel I'm missing the mark... there are edge cases that fail.
Assuming the unpacking function is Y, what I'd like to see:
Y¨ 1 365 730 1095 736591
1 1 1 1 12 31 2 12 31 3 12 31 2017 9 19
There may be library/intrinsic support in some versions to help solve this, but I'm looking for a pure APL code solution.