Skip to content

Commit 42d6560

Browse files
jt3ktimneutkens
authored andcommitted
Simplified format function in with-redux (#6518)
1 parent a99323c commit 42d6560

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

examples/with-redux/components/clock.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,4 @@ export default ({ lastUpdate, light }) => {
1919
)
2020
}
2121

22-
const format = t =>
23-
`${pad(t.getUTCHours())}:${pad(t.getUTCMinutes())}:${pad(t.getUTCSeconds())}`
24-
25-
const pad = n => (n < 10 ? `0${n}` : n)
22+
const format = t => t.toJSON().slice(11, 19) // cut off except hh:mm:ss

0 commit comments

Comments
 (0)