Let's talk about the "perpetual calendar" first, and at least know how to calculate the life span of one year. Then we can read the following books to help: Sanyuanhui, Yuanhai Ziping, Notes on the Wood of the Field, A Thousand Miles of Birthdays Draft and Eight-character Prediction.
We should also learn to use this thing flexibly and generalize it. It is said that a little wisdom is needed. Hehe, I hope I can help you!