title: Replicating YEARFRAC() function from Excel in Python
body: <p>So I am using python in order to automate some repetitive tasks I must do in excel. One of the calculations I need to do requires the use of yearfrac(). Has this been replicated in python?</p>
  
  <p>I found <a href="https://lists.oasis-open.org/archives/office/200804/msg00085.html" rel="noreferrer">this</a>
  but it is incorrect for the value I tried.</p>
  
  <p>(From 12/19/2011 to 3/31/17, yearfrac() gives 5.2833333333333300000, but the python function in the link gives 5.2807978099335156.)</p>