Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
This project rocks and uses MIT-LICENSE.
This project is based upon groupdate and follows a similar API.
The differences between the groupdate and dateslices are:
The reason that I wrote this is that I use sqlite in development, and wanted to make sure that I could test things locally. I didn't understand the test suite of groupdate, so I ended up rewriting it.
A walkthrough of how this code is written is available on my blog
Usage instructions below.
User.where( :created_at > 1.month.ago ).group_by_day
User.group_by_day( :created_at, "sum", "karma" )
Post.group_by_week( :updated_at, "avg", "comment_count")
These methods take three optional arguments:
group_by_second
group_by_minute
group_by_hour
group_by_day
group_by_week
group_by_month
group_by_year
group_by_hour_of_day
group_by_day_of_week
group_by_day_of_month
group_by_month_of_year
The output format defaults to a Chartkick compatible hash of dates and values.
If you wish to use the dateslices format, please add Dateslices.output_format = :dateslices
to an initializer.
Rspec tests need to be run out of the spec/dummy directory, and you'll need to have a postgres and a mysql database named "dateslice_test" for them to succeed.
FAQs
Unknown package
We found that dateslices demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.