{"id":15715825,"url":"https://github.com/gnapse/incomplete_date","last_synced_at":"2025-05-07T01:41:04.710Z","repository":{"id":507943,"uuid":"135482","full_name":"gnapse/incomplete_date","owner":"gnapse","description":"Allows a Rails application to store and manage incomplete date data.","archived":false,"fork":false,"pushed_at":"2023-01-20T03:11:19.000Z","size":55,"stargazers_count":8,"open_issues_count":13,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T11:52:47.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://my.opera.com/gnapse","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnapse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-02-23T16:29:04.000Z","updated_at":"2022-05-13T13:55:05.000Z","dependencies_parsed_at":"2023-02-11T23:30:48.838Z","dependency_job_id":null,"html_url":"https://github.com/gnapse/incomplete_date","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fincomplete_date","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fincomplete_date/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fincomplete_date/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fincomplete_date/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnapse","download_url":"https://codeload.github.com/gnapse/incomplete_date/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252797815,"owners_count":21805778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T21:43:10.669Z","updated_at":"2025-05-07T01:41:04.668Z","avatar_url":"https://github.com/gnapse.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# incomplete_date\n\nThis plugin allows a Rails application to store and manage incomplete date data, which is very common in historical archives, particularly in genealogy.\n\n## Usage\n\nDeclare columns in the database, preferably with the expected attribute name prefixed, for instance with `raw_`. For example, for an attribute named `birth_date` we could declare a column named `raw_birth_date` or alternatively `internal_birth_date`. The type of these columns must be `:integer`.\n\nThen in the models, to have the virtual attributes returning and accepting values of type `IncompleteDate` declare the following:\n\n```ruby\nincomplete_date_attrs :birth_date, :death_date, :prefix =\u003e 'raw'\n```\n\nThe default prefix is `raw` so we do not need to declare it, unless we used another prefix for the columns.\n\nAlternatively, if there's no regular relation between the column name and the expected attribute name, use the following way:\n\n```ruby\nincomplete_date_attr :attr_name, :raw_column_name\n```\n\nNote that in this last example we used the singular method call (finished in `attr` instead of `attrs`). In this case we pass the attribute name we want, followed by the real column name found in the database.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'incomplete_date'\n```\n\nAnd then execute:\n\n```bash\n$ bundle install\n```\n\n\nAlternatively, you can install it yourself as:\n```bash\n$ gem install incomplete_date\n```\n\n## Contributing\n\nIf you want to contribute to (or fork) this project you can clone it by doing the following:\n\n```\ngit clone add git://github.com/gnapse/incomplete_date.git\n```\n\nAnd then send pull requests.\n\n## License\n\nReleased under the MIT license.\n\n## Authors\n\n* Ernesto García \u003cgnapse@gmail.com\u003e\n* Daniel Collado-Ruiz \u003cdaniel@collado-ruiz.es\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnapse%2Fincomplete_date","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnapse%2Fincomplete_date","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnapse%2Fincomplete_date/lists"}