proposed solution for issue #414
add test cases (issue #414)
Merge pull request #418 from l0rdn1kk0n/issue-414

improve Date conversion between java/js