microsoft / microsoft/AdaptiveCards
[JS][Rendering] The DATE and TIME functions do not format according to the system's selected settings
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
Target Platforms
NodeJS
SDK Version
All
Application Name
Any app
Problem Description
In Webkit-based browsers (Chrome, Edge, Opera, and maybe Safari although I haven't tested) the JS function toLocaleDateTimeString doesn't honor the system's format settings (it does respect the selected language though). This in turn means the DATE and TIME functions (which use toLocaleDateTimeString under the covers) do not always format the way a user would expect.
Screenshots
No response
Card JSON
{
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.1",
"body": [
{
"type": "TextBlock",
"separator": true,
"text": "{{DATE(2017-02-14T06:00:00Z, LONG)}}"
}
]
}
Sample Code Language
No response
Sample Code
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the DATE and TIME functions to the JavaScript toLocaleDateTimeString call described in the issue. Reproduce the Adaptive Card example in a WebKit-based browser with different system format settings, then verify that the rendered date and time honor those settings across the listed target browsers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- internationalization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100