pass necessary parameters to the `new Date(y, m, d, h, M, s, ms)`
constructor, add tests and made the tests work on nodejs too