RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Let's pick days by days_picker

Ever felt how many Sundays or maybe Fridays are there this Month.

Ever felt how many Mondays are in this year or maybe 2050.

Ever felt how many Weekdays are there in any year.

And the answer to this is a gem i created called days_picker .

You can find the demo application in action here.

Comments

I feel as though you could pollute the global namespace a bit less by centralizing access to your *days methods as module methods on a DaysPicker module rather than using global constants for each one. Also it would be nice to have the flexibility to query for multiple days in a single method call (such as asking for all the Tuesdays and Thursdays in a month). Some things to think about, anyway.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in