stuartlangridge / gnome-shell-clock-override

Override the Gnome Shell clock with a new time format or text of your choice. Works with new versions of Shell such as 3.18
MIT License
89 stars 33 forks source link

Factor out the creation of the formatted time string #30

Closed brandl-muc closed 5 years ago

brandl-muc commented 5 years ago

Creates new file format.js which includes the helper fromCodePoint() which was moved from extension.js and the new function format() which creates the formatted time string. This enables testing of the formatting function

brandl-muc commented 5 years ago

I didn't add the tests yet but did the refactoring. I tested it and it seems to work but you might also want to give it a try. Especially test the Swatch Beat thing if you live in a different timezone than UTC+1. I temporarily changed my time zone to test it and it still worked correctly.

brandl-muc commented 5 years ago

This PR is intended as first step to resolve #25