it works only If dateA and dateB are in the same node. but If they are in two diffents nodes ? can we use the same function