S
Size: a a a
S
S
S
S
S
RS
normalize(value) {
let str = value.toString();
return str.length > 1 ? str : `0${str}`;
}
render() {
const date = new Date();
const hours = this.normalize(date.getHours());
const mins = this.normalize(date.getMinutes());
const secs = this.normalize(date.getSeconds());
let output = this.template
.replace('h', hours)
.replace('m', mins)
.replace('s', secs);
console.log(output);
}
RS
RS
А
А
RS
А
RS
А
RS
А
q