I am preparing the academic calendar for my institution. It typically looks like the following:
I will create a tabular to fit the data. I have managed to generate the dates by a counter. What I need now is a cyclic counter for the days. I want to type \day[starting day of the month] in the first row, and \day in the successive rows. It should thus generate the entire second column as shown in the above picture. Please help me to achieve that. Following is the code I am working with.
\documentclass[9pt, twoside]{scrartcl}
\usepackage[cmyk]{xcolor}
\usepackage[paperwidth=108mm, paperheight=140mm, top=15mm, bottom=15mm, left=15mm, right=15mm, foot=2.5mm, head=2.5mm, showframe, marginparsep=0mm]{geometry}
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{titlesec}
\makeatletter
\titleformat{\section}[runin]{}{}{0pt}{@gobble}
\titleformat{\subsection}[runin]{}{}{0pt}{@gobble}
\makeatother
\titlespacing{\section}{0pt}{-\baselineskip}{0}
\titlespacing{\subsection}{0pt}{-\baselineskip}{0}
\usepackage{fancyhdr, extramarks}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\sectionmark}[1]{\markboth{#1}{}}
\renewcommand{\subsectionmark}[1]{\markright{#1}}
\fancyhead[LE]{\color{cyan}\leftmark~|~\lastrightmark~|~Academic Calendar 2022-23}
\fancyhead[RO]{\color{cyan}Academic Calendar 2022-23~|~\lastrightmark~|~\leftmark}
\usepackage{hyperref}
\usepackage{ragged2e}
\usepackage{array, longtable}
\parindent0pt
\parskip0pt
\usepackage{etoolbox}
\newcounter{magicrownumbers}
\newcommand\Rownum{\stepcounter{magicrownumbers}\arabic{magicrownumbers}}
\preto\table{\setcounter{magicrownumbers}{0}}
\preto\tabular{\setcounter{magicrownumbers}{0}}
%
%
%
\begin{document}
\thispagestyle{empty}
\vspace*{\fill}
\begin{center}
{\Large\color{cyan}Academic Calendar\2022-23}
\end{center}
\vfill
\newpage
\section{July}
\subsection{Sonada}
%
\begin{center}
\begin{tabular}{rlll}
\Rownum. & Mon & Type & Content\ %Want to replace "Mon" by "\day[starting day of the month]"
\Rownum. & Tue & Type & Content %Want to replace "Tue" by "\day"
\end{tabular}
\end{center}
\newpage
\subsection{Siliguri}
%
\begin{center}
\begin{tabular}{rlll}
\Rownum. & Mon & Type & Content\ %Want to replace "Mon" by "\day[starting day of the month]"
\Rownum. & Tue & Type & Content %Want to replace "Tue" by "\day"
\end{tabular}
\end{center}
%
\end{document}
PS: I will be extra grateful if you please also guide me about how to type the first 9 dates as "01" till "09". Right now it prints "1" till "9".