dateArithmetic problems in global script

why can I not get the dateArithmetic() function to work in a global script?
Is there a module that I have to import?

Unfortunately, dateArithmetic is a function of the expression language, not the scripting language (python). Creating similar functionality in the scripting language was covered recently in this thread:
“Date arithmetic in Python”