mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
fix: add migration for newly introduced has data field
This commit is contained in:
@ -50,16 +50,9 @@ String.prototype.toHHMMSS = function () {
|
||||
}
|
||||
|
||||
String.prototype.toHHMM = function () {
|
||||
var sec_num = parseInt(this, 10)
|
||||
var hours = Math.floor(sec_num / 3600)
|
||||
var minutes = Math.floor((sec_num - (hours * 3600)) / 60)
|
||||
|
||||
if (hours < 10 && hours > 0) {
|
||||
hours = '0' + hours
|
||||
}
|
||||
if (minutes < 10 && minutes > 0) {
|
||||
minutes = '0' + minutes
|
||||
}
|
||||
const sec_num = parseInt(this, 10)
|
||||
const hours = Math.floor(sec_num / 3600)
|
||||
const minutes = Math.floor((sec_num - (hours * 3600)) / 60)
|
||||
return hours + ':' + minutes
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user