forked from DonovanChan/fmfunctions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DatesInRange.calc
26 lines (24 loc) · 703 Bytes
/
DatesInRange.calc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Let ( [
start = GetAsDate ( startDate ) ;
end = GetAsDate ( endDate )
] ;
Case (
start ≤ end ;
DatesInRangeLoop (
start ;
end ;
omitWeekends ;
ListDateToNumber ( omitDateList ) ;
""
)
)
)
/* __________________________________________________
NAME: DatesInRange ( startDate ; endDate ; omitWeekends ; omitDateList )
PURPOSE: Returns list of dates in range. Excludes weekends and/or holidays if specified.
EXAMPLES:
DatesInRange ( "10/1/2010" ; "10/4/2010" ; 1 ; "10/4/2010" ) = "10/1/2010¶10/5/2010"
HISTORY:
Created: 2010-10-15 12:06 PT - Donovan Chandler
Modified: 2010-11-30 12:07 PT - Donovan Chandler : replaced "omitHoliday" param with "omitDateList"
*/