Controller functions to get dates using a frequency format
        
        
- Version:
 - 
		
- 0.0.1
 
 
Methods
- 
    
<inner> formatDatabaseDate(dateString)
 - 
    
    
    
    
    
        
Parameters:
Name Type Description dateStringa date of the form "20190323"  - 
    
<inner> getMondayOfWeek(date)
 - 
    
    Gets the date object of the monday of the relative week
Parameters:
Name Type Description dateDate any day of any week Returns:
relative monday date- Type
 - Date
 
 - 
    
<inner> getNextDate(frequency, startingDate)
 - 
    
    Get the next date
Parameters:
Name Type Description frequencystring the frequency in the given format startingDatedate the starting date from which to calculate the next date Example
Example usage of getNextDate with X-D notation.
// returns Date object of value 2018-01-04T00:00:00.000Z getNextDate('3-D', new Date(2018, 0 , 1)); - 
    
<inner> getNextDates(frequency, startingDate)
 - 
    
    Get all the next dates based on the frequency notation. It does NOT return the original date
Parameters:
Name Type Description frequencystring the frequency expressed as frequency notation startingDateDate the starting date (not included in the result) Returns:
an array containing the next dates but not the given starting date- Type
 - array.<Date>
 
 - 
    
<inner> getNextWeek(week)
 - 
    
    Gets the dates of the next week.
Parameters:
Name Type Description weekReturns:
 - 
    
<inner> getPreviousWeek(week)
 - 
    
    Gets the dates of the previous week.
Parameters:
Name Type Description weekReturns:
 - 
    
<inner> isHoliday(date)
 - 
    
    Check if a date is a holiday in the UK
Parameters:
Name Type Description datedate the date to check  - 
    
<inner> stringIsInteger(str)
 - 
    
    Check if given string is an integer
Parameters:
Name Type Description strstring Returns:
true if string is an integer- Type
 - boolean
 
 - 
    
<inner> validDate(date)
 - 
    
    Check if date is valid
Parameters:
Name Type Description datedate the date