Span in Weekday Series

/*--------------------------------------------------------------

                    SAS Sample Library

        Name: tidgap.sas
 Description: Example program from SAS/ETS User's Guide,
              The TIMEID Procedure
       Title: Span in Weekday Series
     Product: SAS/ETS Software
        Keys: TIME ID
        PROC: TIMEID
       Notes:

--------------------------------------------------------------*/
ods graphics on;

data in;
   drop i;
   format tid date.;
   do i = 1 to 40;
      if (i = 10) then i + 10;
      tid = intnx('weekday17w','19may09'd,i);
      output;
   end;
run;

proc timeid data=in plot = (values spans);
   id tid;
run;