A EDTF behavior for Plone.
A Plone behavior which provides a EDTF Date field and some indexes to search and sort on complex and historic dates.
Note: the current implementation of the used library python-edtf , still uses an earlier draft of the standard: http://www.loc.gov/standards/datetime/pre-submission.html
- Allows unspecific dates or date intervals: “1989-11” or “1989-11~” or “1989-11-01/1989-11-30”
- Seasons: 2001-21 >> Spring, 2001
- old dates like 03.08.1492
- Search indexes: date_earliest and date_latest
- Sort indexes: date_sort_ascending and date_sort_descending
Install collective.edtf_behavior by adding it to your buildout:
[buildout] ... eggs = collective.edtf_behavior
and then running bin/buildout
After you activated the add-on in the Plone Add-ons section, you can Enable this behavior on any Dexterity based content type.
find any document which earliest date is 06.02.1920 or later.
find any document which latest date is 11.11.1711 or earlier.
This package provides a DateRangeInRangeIndex named edtf_start_end_range.
find all documents that fall at least with one start/end date of there interval into the range:
For more examples how to query the indexes, have a look at the tests .
One could improve indexing by using a DateRangeIndex, like the effectiveRange index in Plone if needed.
<!-- Example of a DateRangeIndex like the effectiveRange index in Plone --> <index name="edtf_date_range" meta_type="DateRangeIndex" since_field="date_earliest" until_field="date_latest" />
- Issue Tracker: https://github.com/collective/collective.edtf_behavior/issues
- Source Code: https://github.com/collective/collective.edtf_behavior
If you are having issues, please let us know. You can reach us on Gitter.
The project is licensed under the GPLv2.
- Maik Derstappen, firstname.lastname@example.org
- Add edtf_start_end_range index and document querying in the readme. [MrTango]
- Initial release, with EDTF behavior and 4 main indexes. [MrTango]
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size collective.edtf_behavior-1.0.tar.gz (17.0 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for collective.edtf_behavior-1.0.tar.gz