Skip to content

Commit

Permalink
Update rule.md (#9907)
Browse files Browse the repository at this point in the history
* Update rule.md

Add instructions about browser language settings and update the screenshots of current operating system

* Update rule.md

* Update rule.md

* Add files via upload

Add images to the rule folder

* change image path

* Update rule.md

Add a link to https://www.ssw.com.au/rules/make-sure-all-software-uses-english/

* update image name, and resolved comments

* Update rule.md

Hey @ClaraFang-SSW 

Please see all my extra changes to improve this rule

The most important one is the image captions that you did wrongly. 
More info: https://www.ssw.com.au/rules/rule/#6-images

---------

Co-authored-by: Tiago Araújo [SSW] <tiagov8@gmail.com>
  • Loading branch information
ClaraFang-SSW and tiagov8 authored Feb 20, 2025
1 parent 2d44f4a commit a87870a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
---
seoDescription: Dates should be formatted consistently across an application to avoid confusion for users, aligning with the operating system's regional settings.
type: rule
title: Dates - Do you keep date formatting consistent across your application?
title: Dates - Do you keep date formatting consistent?
uri: dates-do-you-keep-date-formats-consistent-across-your-application
authors:
- title: Adam Cogan
url: https://ssw.com.au/people/adam-cogan
- title: Tiago Araujo
url: https://ssw.com.au/people/tiago-araujo
related: []
related:
- the-value-of-consistency
- make-sure-all-software-uses-english
redirects: []
created: 2014-12-01T05:59:36.000Z
archivedreason: null
guid: 192c14d7-9ae7-45c4-8cdb-de6da1b39580
---

Date formats should always be kept consistent across your application, more importantly, it should be kept consistent with the operating system's regional settings otherwise this will cause significant confusion for your users.
Date formats should always be kept consistent across applications. More importantly, they should be kept consistent with the operating system's regional settings, otherwise this will cause significant confusion for users.

<!--endintro-->

![Figure: Operating System's Regional Settings](../../assets/BetterInterface_RegionalSettings.jpg)
![Figure: Operating System's Regional Settings](operatingsystem-language-setting.png)

::: bad
![Figure: Bad example - Screens with inconsistent date formats](../../assets/BadExampleDP.gif)
Expand All @@ -36,18 +38,33 @@ startTimeTextBox.Text = resultResults.StartTime.ToString("dd/MM/yyyy hh:mm:ss");
```

::: bad
Figure: Bad Example - Using hard coded formatting string
Figure: Bad example - Using hard coded formatting string
:::

```dotnet
'VB.NET
'Initial CultureInfo settings for the application
Public initialCulture As CultureInfo
...
...
txtDateCreate.Text = CType(txtDateCreate.Tag, System.DateTime).ToString(initialCulture.DateTimeFormat)
```

::: good
Figure: Good Example - Using culture info to format datetime
Figure: Good example - Using culture info to format datetime
:::

## Browser language settings

It is required to set web browser language to English (Australia) after modifying the computer reginal and language settings. This ensures proper formatting and compatibility, particularly when downloading web pages or accessing specific web content.

For example, Power BI is date format agnostic and will honor the setting in your browser. If your browser language is set to US English, it may cause date formatting issues.

![Figure: Date format incorrect due to unmodified web page language settings](PowerBI-wrong-date-format.png)

Go to **Browser Settings | Language | Select English (Australia)** as the top priority language:

![Figure: Set English (Australia) as the top priority in the browser language settings](browser-language-setting.png)

For more information, refer to [make sure all software uses English rule](/make-sure-all-software-uses-english).

0 comments on commit a87870a

Please sign in to comment.