Index: trunk/DataCheck/Sourcefile.sh
===================================================================
--- trunk/DataCheck/Sourcefile.sh	(revision 18421)
+++ trunk/DataCheck/Sourcefile.sh	(revision 18422)
@@ -521,6 +521,27 @@
          fi
          ;;
+      # certain number of dates in the future (between 0 and 9)
+      +[1-9])
+         # get next n nights
+         printprocesslog "DEBUG getdates - get the next "$1" days."
+         for (( numdates=1 ; numdates <= $1 ; numdates++ ))
+         do 
+            numhours=`echo " 12 + ( $numdates - 1 ) * 24 " | bc -l`
+            dates=( ${dates[@]} `date +%Y/%m/%d --date="+"$numhours"hour"` )
+         done
+         # hour-dependent number of dates
+         if [ "$2" != "" ] && [ "$3" != "" ]
+         then 
+            # get current hour
+            hour=`date +%k`
+            if [ $hour -le $2 ] || [ $hour -ge $3 ]
+            then
+               printprocesslog "DEBUG getdates - get the current night."
+               dates=( `date +%Y/%m/%d --date="-12hour"` )
+            fi
+         fi
+         ;;
       *) # nothing valid given
-         echo "Please give valid option (YYYY/MM/DD[-RRR] or 1-9999)"
+         echo "Please give valid option (YYYY/MM/DD[-RRR] or 1-9999 or +0-9)"
          finish
          ;;
