Opened 7 years ago

Closed 7 years ago

#30989 closed Cleanup/optimization (fixed)

Remove not implemented `B` time format (Swatch Internet Time).

Reported by: Baptiste Mispelon Owned by: nobody
Component: Utilities Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Baptiste Mispelon)

Since the first public commit, Django has reserved the B time format but raising a NotImplementedError when trying to use it.
According to the docstring, it's supposed to be for the ​Swatch Internet Time.

I've personally never heard of this format and I'm not sure how useful it is, but I suspect this was done to copy ​PHP's date function and its formats.

It seems safe to delete the stub.

Change History (6)

comment:1 by Baptiste Mispelon, 7 years ago

Description: modified (diff)

comment:2 by Mariusz Felisiak, 7 years ago

Resolution: → wontfix
Status: new → closed
Summary: Implement `B` time format (Swatch Internet Time) → Implement `B` time format (Swatch Internet Time).

Thanks for this ticket and patch, however I agree with your comment that it was probably done to copy PHP's date() functionality. Nobody asked about this format in the last 14 years, so I don't think that we need it. I would rather remove ​TimeFormat.B().

comment:3 by Baptiste Mispelon, 7 years ago

Has patch: unset
Resolution: wontfix
Status: closed → new
Type: New feature → Cleanup/optimization

I agree that it's the best course of action.

I'm happy to provide a new PR, I'm currently trying to figure out what re_formatchars is doing in the code of dateformat.py but I should have something this week.

I've reopened this ticket and changed the description accordingly, I hope that' s OK.

comment:4 by Mariusz Felisiak, 7 years ago

Summary: Implement `B` time format (Swatch Internet Time). → Remove not implemented `B` time format (Swatch Internet Time).
Triage Stage: Unreviewed → Accepted

Yes, that's fine, thanks. Please update the ticket description.

comment:5 by Baptiste Mispelon, 7 years ago

Description: modified (diff)
Has patch: set

I've opened a new PR that deletes the stub: ​https://github.com/django/django/pull/12092

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 7 years ago

Resolution: → fixed
Status: new → closed

In cbe4d620:

Fixed #30989 -- Removed unimplemented B time format.

It's never been documented and has always raised a NotImplementedError.

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