refactor DateTime#jd

PR #1766 dropped speed of DateTime#jd, so I refactored the code.
Please see PR #1766 for more information.