{"id":16410232,"url":"https://github.com/danasilver/django-dana-time","last_synced_at":"2025-10-26T17:32:43.711Z","repository":{"id":57419634,"uuid":"12014931","full_name":"danasilver/django-dana-time","owner":"danasilver","description":"If Django Humanize were a little more human.","archived":false,"fork":false,"pushed_at":"2016-01-02T04:40:59.000Z","size":18,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-18T19:48:47.765Z","etag":null,"topics":["django"],"latest_commit_sha":null,"homepage":"","language":"Python","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/danasilver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-10T03:25:34.000Z","updated_at":"2022-04-15T06:30:44.000Z","dependencies_parsed_at":"2022-09-17T11:00:53.293Z","dependency_job_id":null,"html_url":"https://github.com/danasilver/django-dana-time","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/danasilver%2Fdjango-dana-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danasilver%2Fdjango-dana-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danasilver%2Fdjango-dana-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danasilver%2Fdjango-dana-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danasilver","download_url":"https://codeload.github.com/danasilver/django-dana-time/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238380602,"owners_count":19462402,"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":["django"],"created_at":"2024-10-11T06:23:34.955Z","updated_at":"2025-10-26T17:32:43.384Z","avatar_url":"https://github.com/danasilver.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Dana Time [![Build Status](https://travis-ci.org/danasilver/django-dana-time.svg?branch=master)](https://travis-ci.org/danasilver/django-dana-time)\n\nShort, readable datetime filters.\n\n### Install\n\n```\n$ pip install django-dana-time\n```\n\n### Usage\n\n```python\n{% load danatime %}\n\n{{ datetime_instance|danatime:\"previous year format\" }}\n```\n\n\n### Formatting\n\nExamples are shown with `en` translation/formatting and no arguments to the\ntemplate tag.\n\n| timedelta               | danatime                     |\n|-------------------------|------------------------------|\n| 0 seconds               | now                          |\n| 1 second                | a second ago                 |\n| 2 - 60 seconds          | 2 - 60 seconds ago           |\n| 1 minute                | a minute ago                 |\n| 2 - 60 minutes          | 2 - 60 minutes ago           |\n| 1 hour                  | an hour ago                  |\n| 2 - 6 hours             | 2 - 6 hours ago              |\n| 6 - 24 hours, same day  | 4:26 p.m.                    |\n| 6 - 24 hours, yesterday | 4:26 p.m. yesterday          |\n| \\\u003e 24 hours, same year  | Aug 10                       |\n| previous year           | 8/10/2012                    |\n\n\n### Internationalization Notes\n\nAll values are internationalized and localized by default using\n[Django's internationalization and localization support](https://docs.djangoproject.com/en/1.9/topics/i18n/).\n\n#### 6 - 24 hours (same day/yesterday)\n\nUses `defaultfilters.time`, which defaults to the localized\n`settings.TIME_FORMAT`.\n\nExample: In [en](https://github.com/django/django/blob/master/django/conf/locale/en/formats.py),\n`TIME_FORMAT = 'P'`.\n\n#### \\\u003e 24 hours, same year\n\nUses `defaultfilters.date` with an argument of `'MONTH_DAY_FORMAT'`, the\nlocalized `settings.MONTH_DAY_FORMAT`.\n\nExample: In [en](https://github.com/django/django/blob/master/django/conf/locale/en/formats.py),\n`MONTH_DAY_FORMAT = 'F j'`.\n\n#### previous year\n\nUses `defaultfilters.date` with an argument of `'n/j/Y'`.\n\nExample: 10 August 2012 is formatted as `8/10/2012`.\n\nOverride this by passing an optional argument with a format to the filter tag.\n\n#### previous year format examples:\n\nPass `None` to use the default, localized `settings.DATE_FORMAT`:\n\n```\n{{ mytime|danatime:None }}\n```\n\nPass `SHORT_DATE_FORMAT` to use the localized `settings.SHORT_DATE_FORMAT`:\n\n```\n{{ mytime|danatime:\"SHORT_DATE_FORMAT\" }}\n```\n\nPass a format string like `\"F j, Y\"` to use a custom format:\n\n```\n{{ mytime|danatime:\"F j, Y\" }}\n```\n\nThis particular format yields `August 8, 2012`.\n\nSee Django's [available format strings](https://docs.djangoproject.com/en/1.9/ref/templates/builtins/#date)\nfor help.\n\n### Testing\n\n[![Build Status](https://travis-ci.org/danasilver/django-dana-time.svg?branch=master)](https://travis-ci.org/danasilver/django-dana-time)\n\nTested with all combinations of the latest versions of Python 2.7 and 3.4 with\nDjango 1.7, 1.8, and 1.9.\n\nAfter installing Django, run the tests with:\n\n```sh\n$ python runtests.py\n```\n\nInstall tox and run `tox` to test in all environments. This is what the CI does.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanasilver%2Fdjango-dana-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanasilver%2Fdjango-dana-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanasilver%2Fdjango-dana-time/lists"}