Opened 4 years ago

Closed 3 years ago

#32062 closed New feature (fixed)

Add %b support to Date.strftime.

Reported by: Gagan Deep Owned by: Gagan Deep
Component: Internationalization Version: 3.1
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Gagan Deep)

The default Date object of JavaScript has been extended in 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.

Change History (5)

comment:1 by Mariusz Felisiak, 4 years ago

Component: contrib.adminInternationalization
Summary: Option to render abbreviated month name in Date.prototype.strftimeAdd %b support to Date.strftime.
Triage Stage: UnreviewedAccepted

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

comment:2 by Gagan Deep, 4 years ago

Description: modified (diff)
Has patch: set

Hi, I have created a patch for it. PR

comment:3 by Mariusz Felisiak, 4 years ago

Patch needs improvement: set

comment:4 by Mariusz Felisiak, 3 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In 982e860:

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.

Note: See TracTickets for help on using tickets.
Back to Top