Skip to content

Commit d97af6c

Browse files
committed
fix: hours and minutes when bellow to 10
1 parent bd48d0f commit d97af6c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/Parse/ParseHour.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function ParseHour(props) {
22
const today = new Date(props)
33
const hour = today.getHours()
44
const minutes = today.getMinutes()
5-
const hourSet = hour + ':' + minutes
5+
const hourSet = ('0' + hour).slice(-2) + ':' + ('0' + minutes).slice(-2)
66
return hourSet
77
}
88

0 commit comments

Comments
 (0)