Opened 2 years ago

Closed 2 years ago

Last modified 23 months ago

#21258 closed Bug (invalid)

Spanish locale should accept %Y-%m-%d format for dates

Reported by: pegler Owned by: nobody
Component: Uncategorized Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The Spanish formats file does not accept the YYYY-MM-DD format for dates. All the other language formats seem to accept this, as it is the ISO date format. Is there a reason for this, or simply overlooked?

https://github.com/django/django/blob/1dae4ac1778f04805c0ed62c8debb13b281ba02b/django/conf/locale/es/formats.py#L19

Change History (4)

comment:1 Changed 2 years ago by pegler

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from 1.5 to master

comment:2 Changed 2 years ago by claudep

  • Resolution set to needsinfo
  • Status changed from new to closed

get_format in django.utils.formats.py should automatically add ISO formats (hence %Y-%m-%d) in all localized formats. So if you think this doesn't work, could you please add some test or code snippet demonstrating the issue?

comment:3 Changed 23 months ago by pegler

Sorry, I mistakenly checked against 1.4, not master.

comment:4 Changed 23 months ago by claudep

  • Resolution changed from needsinfo to invalid

No problem, thanks for checking.

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