      program test_day_in_week
c
c     ***************************************************************0**
c *   Test_Day_in_Week: compute day in a week, to check with calendars.
c     P. Robert, Dec 2006
c     ***************************************************************0**  
c
      character*9 cmonth,cday
c
      print*
      print 100, '************'
      print*
      print 100, 'doweek: compute day in the week for given year'
      print*
c 
      do 10 iyear=1999,2018
c
      do 10 imonth=1,12
c
      call cp_en_month_name(imonth,cmonth,nbcha)
      call cp_nbday_in_month(iyear,imonth,nbday)
c
      print 100, '--------------'
      print 200, cmonth,iyear
      print 100, '--------------'

  200 format(a,1x,i4)
c
      do 10 iday=1,nbday
c
      call cv_date_to_dotw(iyear,imonth,iday,idow)
      call cp_en_day_name(idow,cday,nbcha)
c
      print 100, cday,iday
      if(cday(1:6).eq.'Sunday') print 100, ' '
c
   10 continue
c
  100 format(a,i3)
c
      print*
      print 100, '************'
      print*
       
      stop 'test_day_in_week.exe: normal termination'
      end
c
c     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0XX
c
