Common date utils javascript