Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Course Queries Syllabus Queries 2 years ago
Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I am following up from the question here. My main purpose is to write a syllabus and schedule for a class that meets only on certain days of the week accounting for some holidays. In this question, I have asked about how to skip weekdays that are not M or W.
Now I want to skip to the next class day if the current class day falls on a holiday. Say I have a list of holihttps://forum.tuteehub.com/tag/days">days {13/1/2014, 22/1/2014}. I want to check if mydate or today in the following code falls on any one of those https://forum.tuteehub.com/tag/days">days and skip to the next classday (M or W) as the case may be. For example, I want third class to fall on 15/1 and sixth calss to fall on 27/1. I am OK if it is not perfectly generalisable (i.e. no need to check for the year and I can make sure that the holihttps://forum.tuteehub.com/tag/days">days listed in the arrary are either a M or W).
\documentclass{article} \usepackage[ddmmyyyy]{datetime}% http://ctan.org/pkg/datetime \usepackage{advdate}% http://ctan.org/pkg/advdate \newdateformat{syldate}{\THEMONTH/\THEDAY/\THEYEAR}%(\shortdayofweekname%{\THEDAY}{\THEMONTH} {\THEYEAR})} \newsavebox{\MONDAY}\savebox{\MONDAY}{Mon}% Mon \makeatletter \newcommand{\cleardate}[1]{% \expandafter\let\csname date@#1@d\endcsname\relax% Clear day \expandafter\let\csname date@#1@m\endcsname\relax% Clear month \expandafter\let\csname date@#1@y\endcsname\relax% Clear year } \makeatother \newcommand{\class}[1]{% \cleardate{mydate}% Clear date \newdate{mydate}{\the\day}{\the\month}{\the\year}% Store date \section*{\displaydate{mydate} \quad #1}% Set heading \setbox1=\hbox{\shortdayofweekname{\getdateday{mydate}}{\getdatemonth{mydate}}{\getdateyear{mydate}}}% \ifdim\wd1=\wd\MONDAY \AdvanceDate[2] \else \AdvanceDate[5] \fi% } \SetDate[06/01/2014] \begin{document} \class{First class} \class{Second class} \class{Third class} \class{Fourth class} \class{Fifth class} \class{Sixth class} \class{Seventh class} \end{document}
I was thinking of using \foreach but that does not work as foreach will skip for each element of the list. I thought \AdvanceDate[0] would work but it does not seem to store the \today after exiting the loop. Any help is appreciated.
\foreach
foreach
\AdvanceDate[0]
\today
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Course Queries 4 Answers
Course Queries 5 Answers
Course Queries 1 Answers
Course Queries 3 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.