All too often one wants a list of dates from one date to another for use in a graph or table. 

All searches on the subject have evaded me.  I do not have Maple15 but I think the tools for such luxuries are there in the new Finance package. 

Without Maple 15, how can I do this in a simple manner?

** edit ** I have converted this to a post, plus added more info below

Well I have created a procedure with one way to achieve this, there may be ways to shorten it or make it more efficient but I haven't worked on that yet (possibly make list a into an array but the lists of such matters are usually relatively short so that would be minor), there may also be easier ways to do such things but this is the one way I originally came up with.

daytoday := proc (day1, month1, year1, day2, month2, year2)
  local i, j, months, months1, months2, b, totalmonth2, d, a, c
  global datelisting:
  a := []:
  for i from year1 to year2 do
    if (i mod 100 <>0 and i mod 400 <> 0 and i mod 4 =0) or (i mod 100 =0 and i mod 400 =0) then months := [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]: else months := [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]: end if:
    for j to 12 do
      a := [op(a), seq(convert(cat(j, "/", k, "/", i), string), k = 1 .. months[j])]:
    end do:
  end do:
  if (year1 mod 100 <>0 and year1 mod 400 <> 0 and year1 mod 4 =0) or (year1 mod 100 =0 and year1 mod 400 =0) then months1 := [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]: else months1 := [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]: end if:
  if (year2 mod 100 <>0 and year2 mod 400 <> 0 and year2 mod 4 =0) or (year2 mod 100 =0 and year2 mod 400 =0) then months2 := [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]: else months2 := [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]: end if:
  if month1 = 1 then b := day1 else b := add(months1[i], i = 1 .. month1-1)+day1: end if:  #position of day1 month1 in year1
  if month2 = 1 then c := day2 else c := add(months2[i], i = 1 .. month2-1)+day2: end if:  #position of day2 month2 in year2
  totalmonth2 := add(months2[i], i = 1 .. 12):
  d := totalmonth2-c+1:  #total days in year2 

  datelisting := a[b .. -d];
end proc

daytoday(25,12,2000,15,3,2001)
["12/25/2000", "12/26/2000", "12/27/2000", "12/28/2000", "12/29/2000", "12/30/2000", "12/31/2000", "1/1/2001", "1/2/2001", "1/3/2001", "1/4/2001", "1/5/2001", "1/6/2001", "1/7/2001", "1/8/2001", "1/9/2001", "1/10/2001", "1/11/2001", "1/12/2001", "1/13/2001", "1/14/2001", "1/15/2001", "1/16/2001", "1/17/2001", "1/18/2001", "1/19/2001", "1/20/2001", "1/21/2001", "1/22/2001", "1/23/2001", "1/24/2001", "1/25/2001", "1/26/2001", "1/27/2001", "1/28/2001", "1/29/2001", "1/30/2001", "1/31/2001", "2/1/2001", "2/2/2001", "2/3/2001", "2/4/2001", "2/5/2001", "2/6/2001", "2/7/2001", "2/8/2001", "2/9/2001", "2/10/2001", "2/11/2001", "2/12/2001", "2/13/2001", "2/14/2001", "2/15/2001", "2/16/2001", "2/17/2001", "2/18/2001", "2/19/2001", "2/20/2001", "2/21/2001", "2/22/2001", "2/23/2001", "2/24/2001", "2/25/2001", "2/26/2001", "2/27/2001", "2/28/2001", "3/1/2001", "3/2/2001", "3/3/2001", "3/4/2001", "3/5/2001", "3/6/2001", "3/7/2001", "3/8/2001", "3/9/2001", "3/10/2001", "3/11/2001", "3/12/2001", "3/13/2001", "3/14/2001", "3/15/2001"]

nops(datelisting);
                                                             81

modified_date_projec.mw


Please Wait...