time-predicates 0.2.5 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{ChangeLog.md → CHANGELOG.md} +12 -0
- data/README.md +13 -10
- data/lib/time_predicates/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87f475048a8eb18fa001fabe45c809fbd6172593
|
4
|
+
data.tar.gz: 60523d4a7db6bb1f3c7f608d016875dadd6042ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f7d0430313ba9033d884d176f5b5066a755c9504b5e166c1bed5968e4003d22dd58aacf4aba6b715aa4e934bb73c1cd6abd98b995d2544eabf59cff00852d56
|
7
|
+
data.tar.gz: e816a40b99e5cd8cbaa6433b188fb58d7eb79ccbea97af275bcf77ff5c3b3b575388460f9f30e2d52c4b9fe7b7c135b90b2657ca2ad2e4bd9953c1a95cae34aa
|
@@ -1,3 +1,15 @@
|
|
1
|
+
### 0.3.1 / 2016-03-04
|
2
|
+
|
3
|
+
* Updated this file
|
4
|
+
|
5
|
+
### 0.3.0 / 2016-03-04
|
6
|
+
|
7
|
+
* Added README to the project
|
8
|
+
|
9
|
+
### 0.2.0 / 2016-03-04
|
10
|
+
|
11
|
+
* Added TravisCI and CodeClimate to the project
|
12
|
+
|
1
13
|
### 0.1.0 / 2016-03-04
|
2
14
|
|
3
15
|
* Initial release - added the following methods:
|
data/README.md
CHANGED
@@ -3,25 +3,28 @@
|
|
3
3
|
[![Build Status](https://secure.travis-ci.org/Szeliga/time-predicates.svg?branch=master)](https://travis-ci.org/Szeliga/time-predicates)
|
4
4
|
[![Code Climate GPA](https://codeclimate.com/github/Szeliga/time-predicates/badges/gpa.svg)](https://codeclimate.com/github/Szeliga/time-predicates)
|
5
5
|
|
6
|
-
|
6
|
+
Comparing dates and time gives me a headache every single time and I need to resolve to drawing timelines in order to determine if the > sign means that a date is in the future or the past in relation to the other one.
|
7
7
|
|
8
|
-
|
8
|
+
This little gem adds several helper predicates to Time and Date classes (and all classes that inherit from them, e.g. DateTime in rails), that help in writing and reading such conditions.
|
9
9
|
|
10
|
-
##
|
10
|
+
## Install
|
11
11
|
|
12
|
-
|
12
|
+
$ gem install time-predicates
|
13
13
|
|
14
|
-
|
14
|
+
or add to your `Gemfile`
|
15
15
|
|
16
|
-
|
16
|
+
gem "time-predicates"
|
17
17
|
|
18
|
-
##
|
18
|
+
## Description
|
19
19
|
|
20
|
-
|
20
|
+
Following predicate methods are available:
|
21
21
|
|
22
|
-
|
22
|
+
* `Date.yesterday.after?(Date.today)`
|
23
|
+
* `Date.yesterday.after_or_equal?(Date.today)`
|
24
|
+
* `Date.yesterday.before?(Date.today)`
|
25
|
+
* `Date.yesterday.before_or_equal?(Date.today)`
|
23
26
|
|
24
|
-
|
27
|
+
The method names are pretty self-explanatory.
|
25
28
|
|
26
29
|
## Copyright
|
27
30
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: time-predicates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Szymon Szeliga
|
@@ -121,7 +121,7 @@ files:
|
|
121
121
|
- ".rubocop.yml"
|
122
122
|
- ".travis.yml"
|
123
123
|
- ".yardopts"
|
124
|
-
-
|
124
|
+
- CHANGELOG.md
|
125
125
|
- Gemfile
|
126
126
|
- LICENSE.txt
|
127
127
|
- README.md
|