Pad time with zeros when saving temperature too
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
|
||||
export default function (jsDate) {
|
||||
const vals = [jsDate.getHours(), jsDate.getMinutes()]
|
||||
return vals.map(val => {
|
||||
if (parseInt(val) < 10) {
|
||||
val = `0${val}`
|
||||
}
|
||||
return val
|
||||
}).join(':')
|
||||
}
|
||||
Reference in New Issue
Block a user