amit9838 / mousam

Wather at a glance
https://amit9838.github.io/mousam/
GNU General Public License v3.0
262 stars 35 forks source link

fixed 24-hour format not working for sunrise/sunset #137

Closed rainloreley closed 5 months ago

rainloreley commented 5 months ago

Fixes #136

It might be better to have a function which only converts any date/timestamp to the correct format selected by the user in the future. The code snippet I added can be found at multiple places within the source code (in different files), which makes it harder to change and maintain if something is changed (e.g. the settings class). Having it in just one function and then calling that with the date/timestamp as an input makes it easier and less prone to bugs like this.

amit9838 commented 5 months ago

Fixes #136

It might be better to have a function which only converts any date/timestamp to the correct format selected by the user in the future. The code snippet I added can be found at multiple places within the source code (in different files), which makes it harder to change and maintain if something is changed (e.g. the settings class). Having it in just one function and then calling that with the date/timestamp as an input makes it easier and less prone to bugs like this.

Right, I'll do that , thanks