script to calculate semester from Date()