karakanb / devo

A Chrome and Firefox extension that displays GitHub Trending, Hacker News, Product Hunt and Designer News on every new tab.
https://burakkarakan.com/devo/
MIT License
401 stars 46 forks source link

Toggle time between 12 & 24 hour formats. Take advantage of date-fns library. #27

Closed rosswaycaster closed 4 years ago

rosswaycaster commented 4 years ago

I've added the date-fns library which we will use to format the two different time formats as well as formatting the date.

I've added functionality that allows for clicking the time to toggle between the 12 & 24 hour time formats.

This was my first time ever using Vue so please let me know if I did something incorrectly!

time-click

karakanb commented 4 years ago

Hi there, thanks a lot for the PR! The experience looks very good, I didn't think of it before.

Before I get into reviewing it, couldn't we do this without actually having a dependency on an external library? date-fns seems 70KBs and I frankly don't see any need of including it only to format the week. What would you think if we implement this using vanilla JS?

karakanb commented 4 years ago

Hi @rosswaycaster, I will be closing this PR because of a long-time inactivity, feel free to re-open if you'd like to consider my suggestions above. I may work on this implementing via vanilla JS if I have time in near future as well.