I would be inclined to just skip all this argument handling and just do `year || 0` (etc) out of interest of brevity, but yours is more explicit. (Though worth noting that when you only pass one value to Date(), it's not the year, it's an epoch timestamp.)