Index: trunk/tools/eam/rawfix.20230221/src/queue.rawfix.sh
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/queue.rawfix.sh	(revision 42449)
+++ trunk/tools/eam/rawfix.20230221/src/queue.rawfix.sh	(revision 42450)
@@ -31,4 +31,22 @@
   set mynight = $2
   
+  set year = `echo $mynight | awk '{print substr($0, 1, 4)}'`
+  if (($year < 2005) || ($year > 2030)) then
+    echo "invalid date $mynight"
+    exit 2
+  endif
+
+  set month = `echo $mynight | awk '{print 1*substr($0, 5, 2)}'`
+  if (($month < 1) || ($month > 12)) then
+    echo "invalid date $mynight"
+    exit 2
+  endif
+
+  set day = `echo $mynight | awk '{print 1*substr($0, 7, 2)}'`
+  if (($day < 1) || ($day > 31)) then
+    echo "invalid date $mynight"
+    exit 2
+  endif
+
   mysql -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME -e "insert into nights (dateobs, state) values ('$mynight', 'new')"
   exit 0
