# 1. Calendar Functions

<table border="1" id="bkmrk-calendar-not-started" style="border-collapse: collapse; width: 99.7531%; height: 450.516px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.1363%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Calendar Functions](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete-ready "Calendar Functions")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 1.0 Calculate field Values for Calendar Tables

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*After the user enters vacation days, and configures start dated, PEMS calculates the number of days in a term.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Trigger*</td><td style="height: 46.5938px;">*Recalculate anytime there is a change to any records used to make these calculations upon save*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*Initial configuration was completed.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*These functions may be run anytime there is a new school term record.*

<p class="callout warning">*need some way to limit how many times this is recalculated.*</p>

</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;"> </td><td style="height: 80.1719px;">Step 1</td><td style="height: 80.1719px;">For each new [School Term](https://cs.studianova.org/admin/terms) record, calculate the number of calendar days between the start and end dates, excluding the days specified in the associated [Term Label](https://cs.studianova.org/admin/termlabels) record. Enter result in [School Term](https://cs.studianova.org/admin/terms) calendar days.

</td></tr><tr style="height: 35.3906px;"><td style="height: 35.3906px;">  
</td><td style="height: 35.3906px;">Step 2</td><td style="height: 35.3906px;">For each [School Term](https://cs.studianova.org/admin/terms), count the number of associated [Vacation Days](https://cs.studianova.org/admin/vacationdays) records with status = activated.</td></tr><tr style="height: 35.375px;"><td style="height: 35.375px;">  
</td><td style="height: 35.375px;">Step 3</td><td style="height: 35.375px;">Calculate [School Term](https://cs.studianova.org/admin/terms) school days by subtracting the number of vacation days found above from the school days, enter as [School Term](https://cs.studianova.org/admin/terms) calendar days</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 4</td><td style="height: 29.7969px;">[Academic Year](https://cs.studianova.org/admin/academicyears) school days is the sum of the associated [School Term](https://cs.studianova.org/admin/terms) school days.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 5</td><td style="height: 29.7969px;">[Academic Year](https://cs.studianova.org/admin/academicyears) calendar days is the sum of the associated [School Term](https://cs.studianova.org/admin/terms) calendar days.</td></tr><tr><td>END</td><td>  
</td><td>  
</td></tr></tbody></table>

<table border="1" id="bkmrk-calendar-functions-n" style="border-collapse: collapse; width: 99.7531%; height: 513.281px;"><colgroup><col style="width: 17.72%;"></col><col style="width: 12.2677%;"></col><col style="width: 70.1363%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Calendar Functions](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete-ready "Calendar Functions")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 1.1 Automatically Create Academic Years Past and Future

</td></tr><tr style="height: 63.3906px;"><td style="height: 63.3906px;">  
</td><td style="height: 63.3906px;">*Purpose*</td><td style="height: 63.3906px;">*Automate creating new academic future academic records when the user-defined promotion date has been reached. This reduces the need for users to add a year every time they complete one.*</td></tr><tr style="height: 38.7969px;"><td style="height: 38.7969px;">  
</td><td style="height: 38.7969px;">*Trigger*</td><td style="height: 38.7969px;">*Promotion Date (school configuration) = actual date*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*Initial configuration was completed.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Sequence*</td><td style="height: 29.7969px;">*This function must run before more school terms can be created.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;"> </td><td style="height: 46.5938px;">Step 1</td><td style="height: 46.5938px;">Find the academic year record the farthest in the future, the <span style="text-decoration: underline;">**"last record"**</span></td></tr><tr style="height: 38.375px;"><td style="height: 38.375px;">  
</td><td style="height: 38.375px;">Step 2</td><td style="height: 38.375px;">Create one more academic year record</td></tr><tr style="height: 169.734px;"><td style="height: 169.734px;">  
</td><td style="height: 169.734px;">Step 3</td><td style="height: 169.734px;">Set field values:

Sequence = last record sequence + 1

Start year = last record start year + 1

End year = last record end year + 1

Academic year name - concatenate start year - end year

start date = last record start date + 1 year

end date = last record end date + 1 year.

set status = future

</td></tr><tr style="height: 26.375px;"><td style="height: 26.375px;">END</td><td style="height: 26.375px;"> </td><td style="height: 26.375px;"> </td></tr></tbody></table>


<table border="1" id="bkmrk-calendar-functions-n-1" style="border-collapse: collapse; width: 100%; height: 288.781px;"><colgroup><col style="width: 17.5525%;"></col><col style="width: 11.9901%;"></col><col style="width: 70.4574%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Calendar Functions](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete-ready "Calendar Functions")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 1.2 Automatically Update Status of Academic Years.

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*Academic Year records have a status of current, past, or future, update the status of the records automatically when the user-defined promotion date has been reached.*</td></tr><tr style="height: 38.7969px;"><td style="height: 38.7969px;">  
</td><td style="height: 38.7969px;">*Trigger*</td><td style="height: 38.7969px;">*Managed by the Promotion WorkFlow*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*There can be only one current year.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Sequence*</td><td style="height: 46.5938px;">*This step is best triggered after the next future record has been made and in accordance with the PROMOTION workflow.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 1</td><td style="height: 29.7969px;">Set previous current academic year status to 'past'</td></tr><tr style="height: 10px;"><td style="height: 10px;">  
</td><td style="height: 10px;">Step 2</td><td style="height: 10px;">Set next year, based on ordinate to current.</td></tr><tr><td>END</td><td>  
</td><td>  
</td></tr></tbody></table>

<table border="1" id="bkmrk-calendar-functions-n-2" style="border-collapse: collapse; width: 100%; height: 970.939px;"><colgroup><col style="width: 17.5525%;"></col><col style="width: 11.9901%;"></col><col style="width: 70.4574%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Calendar Functions](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete-ready "Calendar Functions")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 1.3 Automatically Create School Term Records

</td></tr><tr style="height: 39.375px;"><td style="height: 39.375px;">  
</td><td style="height: 39.375px;">*Purpose*</td><td style="height: 39.375px;">*Automate student term records creation as new academic years are added.*</td></tr><tr style="height: 38.7969px;"><td style="height: 38.7969px;">  
</td><td style="height: 38.7969px;">*Trigger*</td><td style="height: 38.7969px;">*When a new academic year is added.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Sequence*</td><td style="height: 46.5938px;">*This step is best triggered after the creation of a new academic year record. Term records must be made before students can have their plans updated.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 1</td><td style="height: 29.7969px;">Find the first term label record with Flag = official start term.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 2</td><td style="height: 29.7969px;">Create a new school term record</td></tr><tr style="height: 80.1719px;"><td style="height: 80.1719px;">  
</td><td style="height: 80.1719px;">Step 3</td><td style="height: 80.1719px;">Set Term Start Year and Start Date

Academic year: start date =&gt; term: start date

Academic year start year =&gt; term: start year

</td></tr><tr style="height: 214.516px;"><td style="height: 214.516px;">*calculate estimated dates, terms may run over an calendar year*</td><td style="height: 214.516px;">Step 4</td><td style="height: 214.516px;">Calculate Term End Year, Term End Date

If Term Label "End in same year" = true then:

Term End Year = term: <span style="text-decoration: underline;">start yea</span>r

Term End Date = Term: <span style="text-decoration: underline;">start yea</span>r; Term label:end month: Term Label End day

If Term label "End in same year" = False then:

Term End Year = term: <span style="text-decoration: underline;">start yea</span>r + 1

Term End Date = Term: <span style="text-decoration: underline;">end year</span>; Term label:end month: Term Label End day

</td></tr><tr style="height: 145.719px;"><td style="height: 145.719px;">  
</td><td style="height: 145.719px;">Step 4</td><td style="height: 145.719px;">Set other term field values:

Name - concatenate term label name and term: start year

status = future

term label =&gt; related term label record

academic year =&gt; related academic year record

term label flag =&gt; term flag

</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">Step 5</td><td style="height: 46.5938px;">If term label: flag not equal to "official end term" then go to the next term label record, increase term label: sequence by one.</td></tr><tr><td>  
</td><td>Ste 6 </td><td>Set Term Start Year and Start Date

If <span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/= (LESS THAN OR EQUAL TO)** term label start month, term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year

Else term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year + 1

</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 6</td><td style="height: 29.7969px;">Continue to the next Term Label record (sequence + 1), stop when sequence + 1 can not be found (note we must continue past 'official end term' into optional terms.</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 7</td><td style="height: 29.7969px;">Set other term fields per step 4</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">END</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">**[Review 1.3 Use Case Test](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete "Review Use Case Test")**</td></tr></tbody></table>


#### Use Case Test 1.3 Automatically Create School Term Records


<table border="1" id="bkmrk-classic-semesters-i-" style="border-collapse: collapse; width: 100%; height: 1483.48px;"><colgroup><col style="width: 13.1026%;"></col><col style="width: 10.2596%;"></col><col style="width: 10.2596%;"></col><col style="width: 10.754%;"></col><col style="width: 8.77627%;"></col><col style="width: 19.1595%;"></col><col style="width: 6.42769%;"></col><col style="width: 15.3276%;"></col><col style="width: 5.93325%;"></col></colgroup><tbody><tr style="height: 66.8281px;"><td style="height: 66.8281px;">##### **Classic Semesters I**

</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td></tr><tr style="height: 96.9844px;"><td style="height: 96.9844px;">  
</td><td style="height: 96.9844px;">**Term Label Start Month**</td><td style="height: 96.9844px;">**Term Label End Month**</td><td style="height: 96.9844px;">**Term Label Flag**</td><td style="height: 96.9844px;">**Term Label End in Same Year**</td><td style="height: 96.9844px;">**School Term start year**</td><td style="height: 96.9844px;">  
</td><td style="height: 96.9844px;">**School Term end year**</td><td style="height: 96.9844px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">**Academic Year**</td><td style="height: 46.5938px;">9-2023</td><td style="height: 46.5938px;">5-2024</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td></tr><tr style="height: 96.9844px;"><td style="height: 96.9844px;"><span style="color: rgb(224, 62, 45);">**Fall**</span></td><td style="height: 96.9844px;"><span style="color: rgb(224, 62, 45);">9</span></td><td style="height: 96.9844px;"><span style="color: rgb(224, 62, 45);">1</span></td><td style="height: 96.9844px;"><span style="color: rgb(224, 62, 45);">Official Start Term</span></td><td style="height: 96.9844px;"><span style="color: rgb(224, 62, 45);">false</span></td><td style="height: 96.9844px;">flag = official start term start year so start year = academic start year = 2023</td><td style="height: 96.9844px;">pass</td><td style="height: 96.9844px;">"end in same year" = false so term end year = term start year + 1 = 2024</td><td style="height: 96.9844px;">pass</td></tr><tr style="height: 147.375px;"><td style="height: 147.375px;">**Spring**</td><td style="height: 147.375px;">1</td><td style="height: 147.375px;">5</td><td style="height: 147.375px;">Official End Term</td><td style="height: 147.375px;">true</td><td style="height: 147.375px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year = 2024</td><td style="height: 147.375px;">pass</td><td style="height: 147.375px;">"end in same year = true so term end year = term start year = 2024</td><td style="height: 147.375px;">pass</td></tr><tr style="height: 147.375px;"><td style="height: 147.375px;">**Summer**</td><td style="height: 147.375px;">6</td><td style="height: 147.375px;">8</td><td style="height: 147.375px;">  
</td><td style="height: 147.375px;">true</td><td style="height: 147.375px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year = 2024</td><td style="height: 147.375px;">pass</td><td style="height: 147.375px;">"end in same year = true so term end year = term start year = 2024</td><td style="height: 147.375px;">pass</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td></tr><tr style="height: 66.8281px;"><td style="height: 66.8281px;">##### **Classic Semesters II**

</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">**Academic Year**</td><td style="height: 46.5938px;">8-2023</td><td style="height: 46.5938px;">5-2024</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td></tr><tr style="height: 96.9844px;"><td style="height: 96.9844px;">**Fall**</td><td style="height: 96.9844px;">8</td><td style="height: 96.9844px;">12</td><td style="height: 96.9844px;">Official Start Term</td><td style="height: 96.9844px;">true</td><td style="height: 96.9844px;">flag = official start term start year so start year = academic start year = 2023</td><td style="height: 96.9844px;">pass</td><td style="height: 96.9844px;">"end in same year" = true so term end year = term start year = 2023</td><td style="height: 96.9844px;">pass</td></tr><tr style="height: 147.375px;"><td style="height: 147.375px;"><span style="color: rgb(224, 62, 45);">**Spring**</span></td><td style="height: 147.375px;"><span style="color: rgb(224, 62, 45);">12</span></td><td style="height: 147.375px;"><span style="color: rgb(224, 62, 45);">5</span></td><td style="height: 147.375px;"><span style="color: rgb(224, 62, 45);">Official End Term</span></td><td style="height: 147.375px;"><span style="color: rgb(224, 62, 45);">false</span></td><td style="height: 147.375px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year = 2023</td><td style="height: 147.375px;">pass</td><td style="height: 147.375px;">"end in same year" = false so term end year = start year + 1 = 2024</td><td style="height: 147.375px;">pass</td></tr><tr style="height: 147.375px;"><td style="height: 147.375px;">**Summer**</td><td style="height: 147.375px;">6</td><td style="height: 147.375px;">7</td><td style="height: 147.375px;">  
</td><td style="height: 147.375px;">true</td><td style="height: 147.375px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year = 2024</td><td style="height: 147.375px;">  
</td><td style="height: 147.375px;">"end in same year" = true so term end year = start year = 2023</td><td style="height: 147.375px;">pass</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td></tr><tr style="height: 66.8281px;"><td style="height: 66.8281px;">##### Classic Semesters III

</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td><td style="height: 66.8281px;">  
</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">**Academic Year**</td><td style="height: 46.5938px;">8-2023</td><td style="height: 46.5938px;">5-2024</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">  
</td></tr><tr style="height: 96.9844px;"><td style="height: 96.9844px;">**Fall**</td><td style="height: 96.9844px;">8</td><td style="height: 96.9844px;">12</td><td style="height: 96.9844px;">Official Start Term</td><td style="height: 96.9844px;">true</td><td style="height: 96.9844px;">flag = official start term start year so start year = academic start year = 2023</td><td style="height: 96.9844px;">pass</td><td style="height: 96.9844px;">"end in same year" = true so term end year = term start year = 2023</td><td style="height: 96.9844px;">pass</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Spring**</td><td style="height: 29.7969px;">1</td><td style="height: 29.7969px;">5</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">true</td><td style="height: 29.7969px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **NOT** **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year + 1 = 2024</td><td style="height: 29.7969px;">pass</td><td style="height: 29.7969px;">"end in same year" = true so term end year = term start year = 2024</td><td style="height: 29.7969px;">pass</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">**Summer**</td><td style="height: 46.5938px;">6</td><td style="height: 46.5938px;">8</td><td style="height: 46.5938px;">Official End Term</td><td style="height: 46.5938px;">true</td><td style="height: 46.5938px;"><span style="text-decoration: underline;">previous </span>term label record (sequence -1) end month **&lt;/=** term label start month, so term start year = <span style="text-decoration: underline;">previous </span>term (ordinate -1) end year = 2024</td><td style="height: 46.5938px;">pass</td><td style="height: 46.5938px;">"end in same year" = true so term end year = term start year = 2024</td><td style="height: 46.5938px;">pass</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">  
</td></tr></tbody></table>

<table border="1" id="bkmrk-calendar-functions-n-3" style="border-collapse: collapse; width: 100%; height: 288.781px;"><colgroup><col style="width: 17.5525%;"></col><col style="width: 11.9901%;"></col><col style="width: 70.4574%;"></col></colgroup><tbody><tr style="height: 70.4219px;"><td style="height: 70.4219px;">[Calendar Functions](https://bsa.lynops.com/books/personal-education-management-system/page/1-calendar-functions-complete-ready "Calendar Functions")</td><td style="height: 70.4219px;"><span style="color: rgb(224, 62, 45);">Not started</span></td><td style="height: 70.4219px;">#### 1.4 Automatically Calculate Vacation Days In Terms and Academic Years

</td></tr><tr style="height: 63.375px;"><td style="height: 63.375px;">  
</td><td style="height: 63.375px;">*Purpose*</td><td style="height: 63.375px;">*Academic Year records have a status of current, past, or future, update the status of the records automatically when the user-defined promotion date has been reached.*</td></tr><tr style="height: 38.7969px;"><td style="height: 38.7969px;">  
</td><td style="height: 38.7969px;">*Trigger*</td><td style="height: 38.7969px;">*Managed by the Promotion WorkFlow*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">*Conditions*</td><td style="height: 29.7969px;">*There can be only one current year.*</td></tr><tr style="height: 46.5938px;"><td style="height: 46.5938px;">  
</td><td style="height: 46.5938px;">*Sequence*</td><td style="height: 46.5938px;">*This step is best triggered after the next future record has been made and in accordance with the PROMOTION workflow.*</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">Step 1</td><td style="height: 29.7969px;">Set previous current academic year status to 'past'</td></tr><tr style="height: 10px;"><td style="height: 10px;">  
</td><td style="height: 10px;">Step 2</td><td style="height: 10px;">Set next year, based on ordinate to current.</td></tr><tr><td>END</td><td>  
</td><td> </td></tr></tbody></table>