Inspired from DateTime PHP Class and implement the same functionality into JS