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](https://www.php.net/manual/en/function.date.php) and its
formats.
I'm attaching a pull request that implements the format (I think).
--
Ticket URL: <https://code.djangoproject.com/ticket/30989>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> 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](https://en.wikipedia.org/wiki/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](https://www.php.net/manual/en/function.date.php) and its
> formats.
>
> I'm attaching a pull request that implements the format (I think).
New description:
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
[https://en.wikipedia.org/wiki/Swatch_Internet_Time 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
[https://www.php.net/manual/en/function.date.php PHP's date function] and
its formats.
I'm attaching a pull request that implements the format (I think).
--
--
Ticket URL: <https://code.djangoproject.com/ticket/30989#comment:1>
* status: new => closed
* resolution: => wontfix
Comment:
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
[https://github.com/django/django/blob/4527d5db0f0a939439b9373f7a9a4eee3386afff/django/utils/dateformat.py#L71-L73
TimeFormat.B()].
--
Ticket URL: <https://code.djangoproject.com/ticket/30989#comment:2>
* status: closed => new
* resolution: wontfix =>
* has_patch: 1 => 0
* type: New feature => Cleanup/optimization
Comment:
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/30989#comment:3>
* stage: Unreviewed => Accepted
Comment:
Yes, that's fine, thanks. Please update the ticket description.
--
Ticket URL: <https://code.djangoproject.com/ticket/30989#comment:4>
* has_patch: 0 => 1
Old description:
> 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
> [https://en.wikipedia.org/wiki/Swatch_Internet_Time 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
> [https://www.php.net/manual/en/function.date.php PHP's date function] and
> its formats.
>
> I'm attaching a pull request that implements the format (I think).
New description:
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
[https://en.wikipedia.org/wiki/Swatch_Internet_Time 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
[https://www.php.net/manual/en/function.date.php PHP's date function] and
its formats.
It seems safe to delete the stub.
--
Comment:
I've opened a new PR that deletes the stub:
https://github.com/django/django/pull/12092
--
Ticket URL: <https://code.djangoproject.com/ticket/30989#comment:5>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"cbe4d6203ff2d702b63dae52adbe7a50830a5cbe" cbe4d620]:
{{{
#!CommitTicketReference repository=""
revision="cbe4d6203ff2d702b63dae52adbe7a50830a5cbe"
Fixed #30989 -- Removed unimplemented B time format.
It's never been documented and has always raised a NotImplementedError.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30989#comment:6>