Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This page describes how the Date and Time localization is handled in Mobility

Table of Contents
minLevel1
maxLevel7

Implementation of Date and Time Localization

Date and Time Localization of a website or a mobile app require taking into account different formats for date and time. These formats vary, depending on your target country.

Use of Libraries

In software development, there are a numerous technologies, languages, and frameworks that we can use to implement date and time localization. Considering the nature of the project’s requirements, Moment.js has been selected for the implementation.

Moment.js

Moment.JS is a JavaScript library which helps is parsing, validating, manipulating and displaying date/time in JavaScript easily.

Date and Time localization related implementation

In the code level, we are parsing the ‘Locale’ to the moment.locale() function to detect the app specific locale and apply moment().format() function to configure the date and time formats.

...

Example : For Sweden, moment.lang("se").format('L');

Limitations

Here, the implementation doesn’t support the date localization based on the ‘Regions’. Only the basic language will be selected.

...

In the web app, in the class info cards, it has been decided to show the time in 24-hour format irrespective of the format in the locale considering the spacing issues that might arise.

...

Displayed time zone

...

(TP56141/GA2024.32)

In BRP Configuration > Apps > Select your app > “Base Information' tab, there is a field Displayed time zone which determines the time zone of the displayed times in the app and web for group activities & services.

...