Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move away from supporting/recommending (SHORT_)?DATE(TIME?)_FORMAT #7018

Open
12 tasks
dsoftait opened this issue Mar 12, 2025 · 0 comments
Open
12 tasks

Move away from supporting/recommending (SHORT_)?DATE(TIME?)_FORMAT #7018

dsoftait opened this issue Mar 12, 2025 · 0 comments
Labels
triage This issue is new and has not been reviewed. type: feature Introduction of substantial new functionality to the application

Comments

@dsoftait
Copy link
Contributor

As ...

Cora - Coder

I want ...

I want to move away from supporting/recommending the use of (SHORT_)?DATE(TIME?)_FORMAT in Nautobot. This involves deprecating or removing the use of (SHORT_)?DATE(TIME?)_FORMAT in favor of more flexible and locale-based date and time formatting options. Specifically, we should prioritize locale-driven formatting when USE_L10N is set to True and encourage developers to rely on these standardized formats rather than hardcoding (SHORT_)?DATE(TIME?)_FORMAT.

So that ...

By removing reliance on (SHORT_)?DATE(TIME?)_FORMAT, we promote greater localization and ensure that the application behaves according to the user's regional preferences for date and time formats. This will reduce the need for custom formatting logic and provide a more user-friendly experience for users across different regions.

Additionally USE_L10N is on by default in Django 4 and going to be always-on when we move to Django 5 (https://docs.djangoproject.com/en/5.1/releases/5.0/#features-removed-in-5-0)

I know this is done when...

  • Remove all of the (SHORT_)?DATE(TIME?)_FORMAT references in our code and our docs and instead document how to set the locale appropriately to get the desired behavior.
  • Unit tests are updated to ensure that date and time formatting behaves correctly according to locale settings (using USE_L10N).

Optional - Feature groups this request pertains to.

  • Automation
  • Circuits
  • DCIM
  • IPAM
  • Misc (including Data Sources)
  • Organization
  • Apps (and other Extensibility)
  • Security (Secrets, etc)
  • Image Management
  • UI/UX
  • Documentation
  • Other (not directly a platform feature)

Database Changes

No response

External Dependencies

No response

@dsoftait dsoftait added triage This issue is new and has not been reviewed. type: feature Introduction of substantial new functionality to the application labels Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage This issue is new and has not been reviewed. type: feature Introduction of substantial new functionality to the application
Projects
None yet
Development

No branches or pull requests

1 participant