Opened 5 years ago
Last modified 5 years ago
#30989 closed Cleanup/optimization
Remove not implemented `B` time format (Swatch Internet Time). — at Version 5
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 )
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 (5)
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 5 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Summary: | Implement `B` time format (Swatch Internet Time) → Implement `B` time format (Swatch Internet Time). |
comment:3 by , 5 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 , 5 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 , 5 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
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().