\documentclass{article} \usepackage{scrbase}% For \XdivY \usepackage{scrdate}% only for \ISODayName \makeatletter \newcommand*{\dayofisodate}[1]{% \expandafter\@dayofisodate\expanded{#1}\@nil } \newcommand*{\@dayofisodate}{} \def\@dayofisodate#1-#2-#3\@nil{#3} \newcommand*{\thisdate}{\@date} \renewcommand*{\today}{\the\year-\the\month-\the\day} \makeatother \newcommand*{\samedayofweek}[1]{% \numexpr \XdivY{\numexpr\number\dayofisodate{#1}-1\relax}{7} + 1\relax } \newcommand*{\isodayname}[1]{% \expandafter\ISODayName\expandafter{\expanded{#1}}% } \begin{document} \thisdate{} is the number \the\samedayofweek{\thisdate} \isodayname{\thisdate} of the month. \date{2019-08-04} \thisdate{} is the number \the\samedayofweek{\thisdate} \isodayname{\thisdate} of the month. Or for all day of august 2019: \makeatletter \day=1 \@whilenum \day<31 \do {% \date{2019-08-\the\day}% \thisdate{} is the number \the\samedayofweek{\thisdate} \isodayname{\thisdate} of the month.\par \advance\day by \@ne } \makeatother \end{document}