https://github.com/performant-software/fuzzy-dates
https://github.com/performant-software/fuzzy-dates
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/performant-software/fuzzy-dates
- Owner: performant-software
- License: mit
- Created: 2023-09-06T16:51:09.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-09-08T17:09:02.000Z (10 months ago)
- Last Synced: 2025-09-08T19:07:19.022Z (10 months ago)
- Language: Ruby
- Size: 29.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# FuzzyDates
Fuzzy Dates is designed to store date values within a specified amount of accuracy. Each date is stored as a range and a descriptor, so that programmatic operations can still be performed, while providing a user-friendly label.
## Installation
Add this line to your application's Gemfile:
```ruby
gem "fuzzy_dates"
```
And then execute:
```bash
$ bundle install
```
Or install it yourself as:
```bash
$ gem install fuzzy_dates
```
## Usage
```ruby
class MyModel < ApplicationRecord
include FuzzyDates::FuzzyDateable
has_fuzzy_dates :start_date, :end_date
end
```
```ruby
class MyModelsSerializer < BaseSerializer
index_attributes :id, :name, start_date: FuzzyDates::FuzzyDateSerializer, end_date: FuzzyDates::FuzzyDateSerializer
show_attributes :id, :name, start_date: FuzzyDates::FuzzyDateSerializer, end_date: FuzzyDates::FuzzyDateSerializer
end
```
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).