move calendar logic to lunar lib