<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Date difference in days excluding holidays and sundays.. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21427#M3457</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you saying that WEEKDAY is not a valid interval in SAS 9.1.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example program I wrote for this thread uses a custom interval which I don't think applies to your question regarding INTCK('WEEKDAY'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Dec 2014 14:47:38 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2014-12-10T14:47:38Z</dc:date>
    <item>
      <title>Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21417#M3447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data set as shown below. (Actual data set contains more records)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;city&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sol_id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date2&lt;/P&gt;&lt;P&gt;Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0010&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12mar2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30may2011&lt;/P&gt;&lt;P&gt;Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 07Apr2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10jun2011&lt;/P&gt;&lt;P&gt;Delhi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0567&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 23feb2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20jun2011&lt;/P&gt;&lt;P&gt;Mumbai&amp;nbsp; 0710&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17may2011&amp;nbsp;&amp;nbsp;&amp;nbsp; 18may2011&lt;/P&gt;&lt;P&gt;Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp; 0110&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12jan2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 26may2011&lt;/P&gt;&lt;P&gt;Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp; 0510&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03jun2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16jun2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i have the list of holidays peratining to each city in another data set like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;city&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; holiday&lt;/P&gt;&lt;P&gt;Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16mar2011&lt;/P&gt;&lt;P&gt;Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02may2011&lt;/P&gt;&lt;P&gt;kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03may2011&lt;/P&gt;&lt;P&gt;Delhi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01jan2011&lt;/P&gt;&lt;P&gt;Delhi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28feb2011&lt;/P&gt;&lt;P&gt;Delhi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16jun2011&lt;/P&gt;&lt;P&gt;Mumbai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01jan2011&lt;/P&gt;&lt;P&gt;Mumbai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 09jan2011&lt;/P&gt;&lt;P&gt;Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12jan2011&lt;/P&gt;&lt;P&gt;Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13feb2011&lt;/P&gt;&lt;P&gt;Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 06jun2011&lt;/P&gt;&lt;P&gt;Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11jun2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanna find out the the number of working days between date1 and date2 from the first data set excluding all sundays as well as all holidays falling in between from the second data set..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would prefer to have a macro as my both tables contains more number of records(cities).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jun 2011 18:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21417#M3447</guid>
      <dc:creator>syam_india_kochi</dc:creator>
      <dc:date>2011-06-26T18:28:30Z</dc:date>
    </item>
    <item>
      <title>Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21418#M3448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This article talks about using proc FCMP to do this, using a dataset of holidays.&amp;nbsp; I guess it could be adapted to also allow you to specfiy a city/location as part of the calculation.&amp;nbsp; You'd need to be running 9.2 as well of course!&amp;nbsp; (If not the logic can likely be replicated in a data step, and/or via a macro).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://sas-x.com/2011/05/calculating-the-number-of-working-days-between-two-dates/"&gt;http://sas-x.com/2011/05/calculating-the-number-of-working-days-between-two-dates/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jun 2011 23:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21418#M3448</guid>
      <dc:creator>DF</dc:creator>
      <dc:date>2011-06-26T23:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21419#M3449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="text-align: left; padding-left: 60px;"&gt;There are no need to use macro for your simple situation, I think &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data date;
input city&amp;nbsp;&amp;nbsp; $&amp;nbsp; sol_id&amp;nbsp;&amp;nbsp; $&amp;nbsp; date1&amp;nbsp; : date9.&amp;nbsp;&amp;nbsp; date2 : date9.;
format date1 date2 date9.;
datalines;
Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0010&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12mar2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30may2011
Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 07Apr2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10jun2011
Delhi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0567&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 23feb2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20jun2011
Mumbai&amp;nbsp; 0710&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17may2011&amp;nbsp;&amp;nbsp;&amp;nbsp; 18may2011
Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp; 0110&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12jan2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 26may2011
Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp; 0510&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03jun2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16jun2011
;
run;
data holiday;
input city&amp;nbsp;&amp;nbsp; $&amp;nbsp; holiday : date9.;
format holiday date9.;
datalines;
Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16mar2011
Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02may2011
Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03may2011
Delhi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01jan2011
Delhi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28feb2011
Delhi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16jun2011
Mumbai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01jan2011
Mumbai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 09jan2011
Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12jan2011
Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13feb2011
Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 06jun2011
Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11jun2011
;
run;

data temp;
set date;
num_holiday=0;
do i=1 to _nobs;
&amp;nbsp; set holiday(rename=(city=_city))&amp;nbsp; nobs=_nobs point=i;
&amp;nbsp; if city eq _city and holiday ge date1 and holiday le date2 then num_holiday+1;
&amp;nbsp; if i=_nobs then output;
end;
drop i _city holiday;
run;

data want;
set temp;
num_workday=date2-date1-num_holiday+1;
run;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 05:25:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21419#M3449</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-27T05:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21420#M3450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ksharp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OT asked for the number of working days for a 6 days week only (excluding Sunday). &lt;/P&gt;&lt;P&gt;Assuming that working days are from Monday to Friday and that the holiday data set has no days on a Sun wouldn't the calculation in your code be:&lt;/P&gt;&lt;P&gt;num_workday=intck('weeday1w',date1,date2)-num_holiday;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 09:56:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21420#M3450</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2011-06-27T09:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21421#M3451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why is no one suggesting INTERVALDS option where you can specify a data set that defines your custom interval.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 13:20:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21421#M3451</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-06-27T13:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21422#M3452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick.&lt;/P&gt;&lt;P&gt;Yes. I did&amp;nbsp; not consider this&amp;nbsp; situation, thanks for your reminder.&lt;/P&gt;&lt;P&gt;But&amp;nbsp; if OP want ,he or she also can add Sunday , Saturday into the second dataset ,you see?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 03:58:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21422#M3452</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-28T03:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21423#M3453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter&lt;/P&gt;&lt;P&gt;Can you give us an example to display how to use the second dataset as a inter-range dataset to achieve it.&lt;/P&gt;&lt;P&gt;It is very interesting .I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 04:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21423#M3453</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-28T04:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21424#M3454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This program is copied from the example of counting days omitting holidays found here &lt;A href="http://support.sas.com/documentation/cdl/en/etsug/63348/HTML/default/viewer.htm#etsug_intervals_sect008.htm"&gt;http://support.sas.com/documentation/cdl/en/etsug/63348/HTML/default/viewer.htm#etsug_intervals_sect008.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only difference is this program creates 4 custom intervals instead of one.&amp;nbsp; I use a data step and hash to create all four custom intervals in one step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;dm&lt;/SPAN&gt; &lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'clear log; clear output'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;datasets&lt;/STRONG&gt; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;kill&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; range;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; (city sol_id)($) (date1 date2)(:&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: teal; font-family: 'Courier New'; background-color: white;"&gt;date.&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; date: &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: teal; font-family: 'Courier New'; background-color: white;"&gt;weekdate.&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Kochi&amp;nbsp;&amp;nbsp; 0010 12mar2011 30may2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Kochi&amp;nbsp;&amp;nbsp; 0011 07Apr2011 10jun2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Kochi&amp;nbsp;&amp;nbsp; 0011 16mar2011 17mar2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Kochi&amp;nbsp;&amp;nbsp; 0011 16mar2011 16mar2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Kochi&amp;nbsp;&amp;nbsp; 0011 17mar2011 18mar2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Kochi&amp;nbsp;&amp;nbsp; 0011 17mar2011 17mar2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Delhi&amp;nbsp;&amp;nbsp; 0567 23feb2011 20jun2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Mumbai&amp;nbsp; 0710 17may2011 18may2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Cherai&amp;nbsp; 0110 12jan2011 26may2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Cherai&amp;nbsp; 0510 03jun2011 16jun2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;;;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; holiday;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; city $&amp;nbsp; holiday :&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: teal; font-family: 'Courier New'; background-color: white;"&gt;date.&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; holiday &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: teal; font-family: 'Courier New'; background-color: white;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16mar2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02may2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Kochi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03may2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Delhi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01jan2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Delhi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28feb2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Delhi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16jun2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Mumbai&amp;nbsp;&amp;nbsp;&amp;nbsp; 01jan2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Mumbai&amp;nbsp;&amp;nbsp;&amp;nbsp; 09jan2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp; 12jan2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp; 13feb2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp; 06jun2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;Cherai&amp;nbsp;&amp;nbsp;&amp;nbsp; 11jun2011&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;;;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: green; font-family: 'Courier New'; background-color: white;"&gt;*** Create custom interval data sets;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;if&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; holiday;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: green; font-family: 'Courier New'; background-color: white;"&gt;** Lookup table for holidays by city;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;declare&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; hash holidayH(dataset:&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'Holiday'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;,ordered:&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'Y'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; holidayH.definekey(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'city'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'holiday'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; holidayH.definedata(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'city'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'holiday'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; holidayH.definedone();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; holidayH.output(dataset:&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'holicity'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: green; font-family: 'Courier New'; background-color: white;"&gt;** List of CITYs, really just a fancy array;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;declare&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; hash cityH(dataset:&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'Holiday'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;,ordered:&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'Y'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; cityH.definekey(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'city'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; cityH.definedata(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'city'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; cityH.definedone();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; cityH.output(dataset:&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'city'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;declare&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; hiter cityITER(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'cityH'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: green; font-family: 'Courier New'; background-color: white;"&gt;** Output: interval datasets one for each CITY/ custom interval;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;attrib&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; begin &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;8&lt;/STRONG&gt; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: teal; font-family: 'Courier New'; background-color: white;"&gt;weekdate.&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;declare&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; hash intervalds(ordered:&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'Y'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; intervalds.definekey(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'begin'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; intervalds.definedata(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'begin'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; intervalds.definedone();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;attrib&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; intervaldsOPTION &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=$&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;256&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; rc=cityITER.next() &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;by&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;while&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;(rc eq &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start = &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;'01jan2011'd&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&amp;nbsp;&amp;nbsp; = &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;'30jun2011'd&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; begin = start &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; isHoliday = not holidayH.check(key:city,key:begin);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; isWeekend = weekday(begin) in(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;7&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; not(isHoliday or isWeekend) &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; rc=intervalds.add();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intervaldsOPTION = catx(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;,intervaldsOPTION,catx(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'='&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;,city,city));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intervalds.output(dataset:city);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intervalds.clear();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc=cityITER.next();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; intervaldsOPTION=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; execute(cats(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'options intervalds=('&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;,intervaldsOPTION,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;');'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;stop&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;options&lt;/STRONG&gt; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;option&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=intervalds;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;report&lt;/STRONG&gt; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=kochi &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;panels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;3&lt;/STRONG&gt; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;nowd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;define&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; begin / &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;display&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; range2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 8pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; range;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; daysSpecial = intck(city,date1,date2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; days&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = intck(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'DAY'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;,date1,date2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; WeekDays&amp;nbsp;&amp;nbsp;&amp;nbsp; = intck(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'WEEKDAY'&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;,date1,date2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;print&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 8pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 20:30:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21424#M3454</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-06-28T20:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21425#M3455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also not familiar with this method.I need some more time to digest. Thanks your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 02:55:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21425#M3455</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-29T02:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21426#M3456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to share my script written for SAS 9.2 with a colleague who is running SAS 9.1.3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And therefore I need an equivalent of INTCK("weekday", start_date, end_date);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code looks complicated to me. How would I modify the above just to incorporate counting the number of days between two dates excluding weekends?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 14:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21426#M3456</guid>
      <dc:creator>hellind</dc:creator>
      <dc:date>2014-12-10T14:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21427#M3457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you saying that WEEKDAY is not a valid interval in SAS 9.1.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example program I wrote for this thread uses a custom interval which I don't think applies to your question regarding INTCK('WEEKDAY'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 14:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21427#M3457</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-12-10T14:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21428#M3458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I prefer to Hash Table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 03:59:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/21428#M3458</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-12-14T03:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date difference in days excluding holidays and sundays..</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/352043#M82022</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I want exclude holidays from a holidays list(dataset)&lt;/P&gt;&lt;P&gt;if it is possible Kindly explain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 04:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-difference-in-days-excluding-holidays-and-sundays/m-p/352043#M82022</guid>
      <dc:creator>bollurajkumar</dc:creator>
      <dc:date>2017-04-21T04:24:54Z</dc:date>
    </item>
  </channel>
</rss>

