[Django] #36820: Date Parsing Modernization

2 views
Skip to first unread message

Django

unread,
Dec 22, 2025, 11:36:43 AM (13 hours ago) Dec 22
to django-...@googlegroups.com
#36820: Date Parsing Modernization
-------------------------------------+-------------------------------------
Reporter: Varun | Owner: Varun Kasyap
Kasyap Pentamaraju | Pentamaraju
Type: New | Status: assigned
feature |
Component: Utilities | Version: dev
Severity: Normal | Keywords: dateparse,
Triage Stage: | timesince
Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
I have been analyzing django.utils.dateparse and django.utils.timesince.
Currently, developers have to write custom logic for many very common use
cases.

Maybe we should add built-in support for these common cases:
Please correct me if i am wrong

1) parse_datetime relies on regex and does not support partial dates (for
example, providing "2024" returns None instead of a datetime like
2024-01-01 12:00).
2) timesince forces long-form output such as "1 year, 2 months" using
hard-coded joins, while modern UIs prefer compact formats like "1y 2mo" or
"2w".
3) Support a customizable “Just now” threshold instead of returning "0
minutes" for very small time differences.
--
Ticket URL: <https://code.djangoproject.com/ticket/36820>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 22, 2025, 12:36:50 PM (12 hours ago) Dec 22
to django-...@googlegroups.com
#36820: Date Parsing Modernization
-------------------------------------+-------------------------------------
Reporter: Varun Kasyap | Owner: Varun
Pentamaraju | Kasyap Pentamaraju
Type: New feature | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: dateparse, | Triage Stage:
timesince | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Varun Kasyap Pentamaraju:

Old description:

> I have been analyzing django.utils.dateparse and django.utils.timesince.
> Currently, developers have to write custom logic for many very common use
> cases.
>
> Maybe we should add built-in support for these common cases:
> Please correct me if i am wrong
>
> 1) parse_datetime relies on regex and does not support partial dates (for
> example, providing "2024" returns None instead of a datetime like
> 2024-01-01 12:00).
> 2) timesince forces long-form output such as "1 year, 2 months" using
> hard-coded joins, while modern UIs prefer compact formats like "1y 2mo"
> or "2w".
> 3) Support a customizable “Just now” threshold instead of returning "0
> minutes" for very small time differences.

New description:

I have been analyzing django.utils.dateparse and django.utils.timesince.
Currently, developers have to write custom logic for many very common use
cases.

Maybe we should add built-in support for these common cases:
Please correct me if i am wrong

1) parse_datetime relies on regex and does not support partial dates (for
example, providing "2024" returns None instead of a datetime like
2024-01-01 12:00).
2) timesince forces long-form output such as "1 year, 2 months" using
hard-coded joins, while modern UIs prefer compact formats like "1y 2mo" or
"2w".
3) Support a customizable “Just now” threshold instead of returning "0
minutes" for small time differences.

--
--
Ticket URL: <https://code.djangoproject.com/ticket/36820#comment:1>

Django

unread,
Dec 22, 2025, 2:19:16 PM (10 hours ago) Dec 22
to django-...@googlegroups.com
#36820: Date Parsing Modernization
-------------------------------------+-------------------------------------
Reporter: Varun Kasyap | Owner: Varun
Pentamaraju | Kasyap Pentamaraju
Type: New feature | Status: closed
Component: Utilities | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: dateparse, | Triage Stage:
timesince | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* resolution: => wontfix
* status: assigned => closed

Comment:

First, please don't combine multiple issues in one ticket.

Second, you haven't presented each case in sufficient detail to explain
why they are "very common use cases." Do you have examples of projects
that implement each proposal?

Generally, new features require some discussion on the
[https://forum.djangoproject.com/c/internals/5 Django Forum] or at
https://github.com/django/new-features.
--
Ticket URL: <https://code.djangoproject.com/ticket/36820#comment:2>
Reply all
Reply to author
Forward
0 new messages