Skip to content

Refactor getIterationPeriod() to support locale dateformat

Sascha Eggenberger requested to merge date-iteration-perid-refactor into master

What does this MR do and why?

Refactor getIterationPeriod() to support locale dateformat function

Problem

Localization is currently not provided. There are language and regional differences how the date format is to be expected, e.g.:

Language Format
US English mm-dd-yyyy
UK English dd–mm–yyyy
German dd.mm.yyyy

to just name a few.

Solution

Leverage our localization functions instead of customizing date formats. This MR refactors the dates used to add support for locale date formats:

  • Omits year if it's the current year
  • Omits the month for the start date if it's the same as the due date
  • Shows year if it's not the current year or different between start and due date

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
English format (default)
before2 after2
German format example
before after

How to set up and validate locally

  1. Check e.g. http://gdk.test:3000/flightjs/Flight/-/cadences
  2. Change your localization options (http://gdk.test:3000/-/profile/preferences) to e.g. German (which uses a different date format)
  3. Check the cadences page again

Related to #499695 (closed), #503256 (closed)

Edited by Sascha Eggenberger

Merge request reports

Loading