[Django] #32062: Option to render abbreviated month name in Date.prototype.strftime

18 views
Skip to first unread message

Django

unread,
Oct 1, 2020, 11:21:07 AM10/1/20
to django-...@googlegroups.com
#32062: Option to render abbreviated month name in Date.prototype.strftime
-----------------------------------------+----------------------------
Reporter: Gagan Deep | Owner: Gagan Deep
Type: New feature | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+----------------------------
The default Date object of JavaScript has been extended in
[[https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/core.js#L94-L110
| static/admin/js/core.js]] to provide additional function to format dates
in desired format. Recently, I required the need to have abbreviated month
name. This functionality is not available in current implementation.
Since, I have already implemented for my use case, I thought it might be
helpful upstream. If this feature looks worth it, I would like to add this
functionality for "%b" directive.

You thoughts are always welcomed.

--
Ticket URL: <https://code.djangoproject.com/ticket/32062>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 1, 2020, 2:04:11 PM10/1/20
to django-...@googlegroups.com
#32062: Add %b support to Date.strftime.
-------------------------------------+-------------------------------------

Reporter: Gagan Deep | Owner: Gagan
| Deep
Type: New feature | Status: assigned
Component: | Version: 3.1
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* component: contrib.admin => Internationalization
* stage: Unreviewed => Accepted


Comment:

Tentatively accepted, this will probably require a new option in
`window.CalendarNamespace`.

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

Django

unread,
Oct 24, 2020, 10:13:36 PM10/24/20
to django-...@googlegroups.com
#32062: Add %b support to Date.strftime.
-------------------------------------+-------------------------------------
Reporter: Gagan Deep | Owner: Gagan
| Deep
Type: New feature | Status: assigned
Component: | Version: 3.1
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Gagan Deep):

* has_patch: 0 => 1


Old description:

> The default Date object of JavaScript has been extended in
> [[https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/core.js#L94-L110
> | static/admin/js/core.js]] to provide additional function to format
> dates in desired format. Recently, I required the need to have
> abbreviated month name. This functionality is not available in current
> implementation. Since, I have already implemented for my use case, I
> thought it might be helpful upstream. If this feature looks worth it, I
> would like to add this functionality for "%b" directive.
>
> You thoughts are always welcomed.

New description:

The default Date object of JavaScript has been extended in
[[https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/core.js#L94-L110
| static/admin/js/core.js]] to provide additional function to format dates
in desired format. Recently, I required the need to have abbreviated month
name. This functionality is not available in current implementation.
Since, I have already implemented for my use case, I thought it might be
helpful upstream. If this feature looks worth it, I would like to add this
functionality for "%b" directive.

You thoughts are always welcomed.

--

Comment:

Hi, I have created a patch for it.
[https://github.com/django/django/pull/13600 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32062#comment:2>

Django

unread,
Oct 28, 2020, 6:13:38 AM10/28/20
to django-...@googlegroups.com
#32062: Add %b support to Date.strftime.
-------------------------------------+-------------------------------------
Reporter: Gagan Deep | Owner: Gagan
| Deep
Type: New feature | Status: assigned
Component: | Version: 3.1
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/32062#comment:4>

Django

unread,
Oct 28, 2020, 7:08:47 AM10/28/20
to django-...@googlegroups.com
#32062: Add %b support to Date.strftime.
-------------------------------------+-------------------------------------
Reporter: Gagan Deep | Owner: Gagan
| Deep
Type: New feature | Status: closed
Component: | Version: 3.1
Internationalization |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"982e860b736a4b1cc359e1fc90ce62d9b1ac7d0a" 982e860]:
{{{
#!CommitTicketReference repository=""
revision="982e860b736a4b1cc359e1fc90ce62d9b1ac7d0a"
Fixed #32062 -- Added %b support to Date.strftime.

This enables the admin to display the month as locale's abbreviated
name if %b is used in the date format.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32062#comment:5>

Reply all
Reply to author
Forward
0 new messages