a script to handle my date calculation