Skip to content

chnm/django-historical-dates

Repository files navigation

historical-dates

django-historical-dates is a Django app to work with historical dates and calendars in Django applications. A reusable Django app to handle uncertain, partial, approximate, and ranged historical dates with native EDTF (Extended Date/Time Format) support.

Detailed documentation is in the "docs" directory.

Features

  • Supports human-readable display dates
  • Parses EDTF strings into sortable start and end dates
  • Validates EDTF syntax on admin and forms
  • Provides a HistoricalDateField for referencing in other models
  • Handles various historic calendar systems

Quick start

  1. Add "historical_dates" to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...,
        "historical_dates",
    ]
    
  2. Run python manage.py migrate to create the models.

  3. Use the historical dates in your models:

from historical_dates.fields import HistoricalDateField

class Artifact(models.Model):
    production_date = HistoricalDateField()

About

django-historical-dates is a Django app to work with historical dates and calendars in Django applications. Designed to handle uncertain, partial, approximate, and ranged historical dates with native EDTF support.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors