Surya Siddhanta
मासाब्ददिनसम्ख्याप्तम् द्वित्रिघ्नम् रूपसम्युतम्। सप्तोद्धृतावशेषौ तु विज्ञेयौ मासवर्षौ ॥
Divide the number of elapsed terrestrial days by the number of days in a month and by that in a year (i. e. by 30 and 360) multiply the quotients (rejecting the remainders) by 2 and 3 respectively, and increase the products by 1. Divide the results by 7, and reckoning (the order of the Rulers) from the Sun, the remainders will give the Rulers of the present (terrestrial) month and year respectively.
english translation
mAsAbdadinasamkhyAptam dvitrighnam rUpasamyutam। saptoddhRtAvazeSau tu vijJeyau mAsavarSau ॥
hk transliteration by Sanscript