Number of days between 2 dates in Python and JavaScript
Sun, 02 April 2017
day_diff.py
def day_diff(oldest, newest): """ :param datetime oldest: :param datetime newest: """ if oldest > newest: return 0 delta = newest - oldest return delta.days
day_diff.js
function day_diff(first, second) { return Math.round((second-first)/(1000*60*60*24)); }