function - datetime comparison

function - datetime comparison

For deluge scripting, is there a datetime comparison function to see which one is of the earlier/later time? Is the operator built for datetime comparison or is it only comparing it as number? Also, is it possible to have multiple function within a script or do I have to create multiple script and have one call(not sure if this is even possible) the other?