Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Assignment for Frontend Developer [Level-2] 

​Due Date Generation 


 
Design and develop given forms in Angular 7+. User can select any frequency 
and based on the user’s selection, due dates should be generated. You will find 
a form for Weekly Off & Holidays. You can put some static data for Weekly Off & 
Holidays (no need to create the backend to save). Frequency is the rate of 
occurrence of a responsibility. 
 
Your algorithm should: 
- generate the due dates according to the Frequency, start date and end 
date 
- if the generated due date falls on Weekly off or Holidays, the due date will 
be postponed 
 
Please avoid creating fancy forms to save your time. But your form should be in 
usable condition for user to test the algorithm. 
 
Example: 
- User selects ​Daily​ frequency which starts from 3rd December, 2019 and ends 
after 5 occurrences considering the selected Weekly off was set as ​Saturday​ & 
Sunday​ and ​no holidays​ were set for December, 2019. 
 
03-Dec-2019 
04-Dec-2019 
05-Dec-2019 
06-Dec-2019 
07-Dec-2019​ (Since this is Saturday and we have configured it has weekly off, this 
date should be ignored) 
08-Dec-2019​ (This date will also be ignored as it’s weekly off [ Sunday]) 
09-Dec-2019 
 
This way we got five due dates according to the selection. If there is no End 
date or End after occurance is selected, will be considered as an ongoing 
process. By default the​ current date​ will be the ​start date. 
 
We have given more examples on last page 
 
Following frequency options are available: 
 
- Daily 
- Weekly 
- Monthly 
- Yearly 
- One time 
 
   
Daily 

 
 

 
Weekly 

 
 
 

   
Monthly 

 
Yearly

 
 
One Time 

 
 
 
 

   
Weekly off & Holidays 
 

 
 

   
More Examples 
Frequency type  Start Date  Output 

Daily  2019-11-30  2019-11-30 


2019-12-01 
2019-12-02 
2019-12-03 
2019-12-04 
2019-12-05 etc 

Weekly  2019-11-30  2019-12-04 


(Every Wednesday)  2019-12-11 
2019-12-18 etc 

Monthly  2019-11-30  2020-01-06 


(6th of every month)  2020-02-06 
2020-03-06 
2021-01-06 
2021-02-06 etc 

Yearly  2019-11-30  2020-11-06 


(6th of every year)  2021-11-06 
2022-11-06 
2023-11-06 etc 

One Time  2019-11-06  2019-11-06 

You might also like