Housekeeping script

I have a directory ( eg. /tmp , there are many files in it , I would like to do the houskeeping job , can advise how to develop a script to do the following .
1) if the files are elder than 10 days in this directory , the extension is .txt , then move it to /tmp/tmp-txt , the same , if the files are elder than 10 days in this directory , the extension is .csv , then move it to /tmp/tmp-csv
2) if the files in /tmp/tmp-txt and /tmp/tmp-csv are elder than 30 days , then tar it to a file and remove it from this directory .

find /tmp -type f -mtime 10 -maxdepth 0 -name \*.txt mv {} /tmp/tmp-txt \;

For part 2, do you mean, if there is no file younger than 30 days, tar up the directory, or do you mean if there are any files older than 30 days tar up the directory?

thanks reply ,

I mean if the files are older than 30 days, then tar these files ( do it once / month ) .

thanks