StatementDatesValidator
public enum StatementDatesValidator
Helps validate if all statements are present based on the statement dates
-
Checks an array of dates for a recurring pattern
Identifies if the dates occur on a monthly, quarterly or yearly pattern If a pattern is identified, it will check for any missing occurrences.
Declaration
Swift
public static func checkDates(_ dates: [Date], for name: String) -> StatementResult
Parameters
dates
array of dates to check
name
file name, will be added to the result
Return Value
StatementResult
with the identified frequency, errors and warnings -
Tried to determine the frequency of statements based on the dates
Identifies if the dates occur on a monthly, quarterly or yearly pattern
Declaration
Swift
public static func identifyFrequency(_ dates: [Date]) -> StatementFrequency
Parameters
dates
array of dates to check
Return Value