Default to ISO 8601 date format in UI and add "June 26, 2016" as tooltip #4386

Closed
opened 2025-12-29 18:35:28 +01:00 by adam · 5 comments
Owner

Originally created by @ypid on GitHub (Dec 19, 2020).

Originally assigned to: @ypid on GitHub.

Environment

  • Python version: 3.7.3
  • NetBox version: 2.10.1

Proposed Functionality

The current approach seems to be to use ISO 8601

SHORT_DATE_FORMAT = 'Y-m-d'          # 2016-06-26

where the logical order matters, for example in the changelog view that is sorted by time. For "free text" dates,

DATE_FORMAT = 'N j, Y'               # June 26, 2016

is used. I am proposing to use SHORT_DATE_FORMAT everywhere in the UI except in tooltips. And then augment dates as tooltip in DATE_FORMAT. This is because ISO 8601 is the standard for dates in written form. If the user ever needs to communicate a date via voice, they are expected to translate 2016-06-26 in their head or peek in the tooltip and say "June 26, 2016".

@jeremystretch commented on ISO 8601 in https://github.com/netbox-community/netbox/issues/1412#issuecomment-321318039 already so I assume there is some background to the current default. I still would like to discuss this.

Use Case

Consistency.

Database Changes

No.

External Dependencies

No.

Originally created by @ypid on GitHub (Dec 19, 2020). Originally assigned to: @ypid on GitHub. <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for proposing specific new features or enhancements. If you have a general idea or question, please start a discussion instead: https://github.com/netbox-community/netbox/discussions NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.7.3 * NetBox version: 2.10.1 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality The current approach seems to be to use ISO 8601 ```python SHORT_DATE_FORMAT = 'Y-m-d' # 2016-06-26 ``` where the logical order matters, for example in the changelog view that is sorted by time. For "free text" dates, ```python DATE_FORMAT = 'N j, Y' # June 26, 2016 ``` is used. I am proposing to use `SHORT_DATE_FORMAT` everywhere in the UI except in tooltips. And then augment dates as tooltip in `DATE_FORMAT`. This is because ISO 8601 is *the* standard for dates in written form. If the user ever needs to communicate a date via voice, they are expected to translate 2016-06-26 in their head or peek in the tooltip and say "June 26, 2016". @jeremystretch commented on ISO 8601 in https://github.com/netbox-community/netbox/issues/1412#issuecomment-321318039 already so I assume there is some background to the current default. I still would like to discuss this. <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case Consistency. <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes No. <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies No.
adam added the status: acceptedtype: feature labels 2025-12-29 18:35:28 +01:00
adam closed this issue 2025-12-29 18:35:28 +01:00
Author
Owner

@xkilian commented on GitHub (Dec 21, 2020):

Depending on the language for your region this may or may not be true. For latin based languages, it is more natural to say out loud(or in his head) 26th of June 2016(in the language of choice). Depends on the intent when using the tooltip. Anyway, idea is interesting for the tootip.

@xkilian commented on GitHub (Dec 21, 2020): Depending on the language for your region this may or may not be true. For latin based languages, it is more natural to say out loud(or in his head) 26th of June 2016(in the language of choice). Depends on the intent when using the tooltip. Anyway, idea is interesting for the tootip.
Author
Owner

@jeremystretch commented on GitHub (Dec 21, 2020):

Marking this as needs owner for anyone who wants to do the work. Please ensure that all changes are kept consistent across all objects.

For latin based languages, it is more natural to say out loud(or in his head) 26th of June 2016(in the language of choice).

The date formats are all configurable.

@jeremystretch commented on GitHub (Dec 21, 2020): Marking this as `needs owner` for anyone who wants to do the work. Please ensure that all changes are kept consistent across all objects. > For latin based languages, it is more natural to say out loud(or in his head) 26th of June 2016(in the language of choice). The date formats are all [configurable](https://netbox.readthedocs.io/en/stable/configuration/optional-settings/#date-and-time-formatting).
Author
Owner

@stale[bot] commented on GitHub (Feb 4, 2021):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@stale[bot] commented on GitHub (Feb 4, 2021): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@ypid commented on GitHub (Feb 4, 2021):

I am looking into this now. Not sure how far I get. I will open a PR in the best case.

@ypid commented on GitHub (Feb 4, 2021): I am looking into this now. Not sure how far I get. I will open a PR in the best case.
Author
Owner

@ypid commented on GitHub (Feb 8, 2021):

I opened #5764 which implements this.

@ypid commented on GitHub (Feb 8, 2021): I opened #5764 which implements this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4386