Find decimal year from time

Link to an older thread with a detailed discussion of this topic.