HalosGhost / shaman

A small, native C library and utility to fetch weather
GNU General Public License v2.0
49 stars 4 forks source link

Simple formatting of time variables #23

Closed mkoskar closed 10 years ago

mkoskar commented 10 years ago

I've added simple formatting of time time variables (for %a, %s, %S) in strftime %H:%M:%S format. Change itself is 3 lines, for 3 variables, format is hard-coded inline. I just wanted to see value of these variables. I think %H:%M:%S works reasonably well and don't have to be configurable (well at least for now it's not, yet it does the job). Since I was editing weather.c I've removed all extraneous spaces (same can be done with shaman.c). I've edited also docs to include format there. Probably whole thing can be improved in various ways, yet this seems to me as reasonable output format / handling for start.

If this fits the bill, consider merging. Thanks for shaman! ;)

HalosGhost commented 10 years ago

I'm going to deny this pull request but I don't wish to discourage you from contributing your ideas, requests and hopes in the future. Your heart is in the right place, and much of what you propose is actually a very good idea.

However, formatting time variables is planned (and will be implemented along with formatting numeric measurements). Doing both the way they should be done (I like to avoid doing things half-way when I can) requires a restructuring of the library (see #21).

I am glad you enjoy shaman, and I hope you only find it more enjoyable as it matures!