Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add support for calendar years, calendar months and more #43

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ spec/reports
test/tmp
test/version_tmp
tmp
.DS_STORE
7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Metrics/BlockLength:
Exclude:
- spec/*
Metrics/ClassLength:
Max: 125
Metrics/MethodLength:
Max: 12
7 changes: 7 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-05-14 10:24:21 +0000 using RuboCop version 0.52.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
27 changes: 23 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
language: ruby
rvm:
- 2.2
- 2.3
- 2.4
- 2.6.0-preview1
- 2.5.1
- 2.5.0
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.9
- 2.2.8
- 2.2.7
- 2.2.6
- 2.2.5
- ruby-head
- jruby-19mode # JRuby in 1.9 mode
# uncomment this line if your project needs to run something other than `rake`:
script: bundle exec rspec spec
gemfile:
- Gemfile.activesupport51

before_install:
- gem install bundler
- gem install bundler
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# CHANGELOG

## v0.8.0

* Supports inclusive vs exclusive date ranges
* Respects timezones
* Correctly calculates differences over leap years (does not assume 365.25 days
in a year or 30.42 days in a month)
* Correctly corrects for daylight savings
* Support for in_calendar_years and in_calendar_months for monthly and yearly
billing cycle calculation support

## v0.4.2
* Support Time, DateTime, and Date class as input

Expand All @@ -9,4 +21,4 @@

## v0.1.0

* First release at v0.1.0, here we go!
* First release at v0.1.0, here we go!
8 changes: 4 additions & 4 deletions Gemfile.activesupport51
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "https://rubygems.org"
gemspec
gem 'activesupport', '~> 5.1'
source 'https://rubygems.org'
gemspec

gem 'activesupport', '~> 5.1'
6 changes: 3 additions & 3 deletions Rakefile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env rake
require "bundler/gem_tasks"
require 'bundler/gem_tasks'

require 'rspec/core/rake_task'

task :default => :spec
RSpec::Core::RakeTask.new('spec')
task default: :spec
RSpec::Core::RakeTask.new('spec')
Loading