microsoft / microsoft/AdaptiveCards

[Feature Request] TIME() localization with seconds

Open
#8,688 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Request
Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Problem Statement

As per time localization docs, {{TIME(2017-02-14T06:00:32Z)}} displays only 6:00 AM (assuming machine in GMT).

For my use case, I wanted to display it as 6:00:32 AM. Developers do not have any option to display the seconds field.

Proposed solution

Like DATE(), can COMPACT (default), LONG and SHORT formatting params be provided for TIME()?

{{TIME(2017-02-14T06:00:32Z, COMPACT)}} displays 6:00 AM
{{TIME(2017-02-14T06:00:32Z, SHORT)}} displays 6:00:32 AM
{{TIME(2017-02-14T06:00:32.234Z, LONG)}} displays 6:00:32.234 AM

Striking through the initial solution proposal as there are just too many cases to consider (24-hour format, X hours ago format etc. which will be never-ending). I am not sure what to suggest.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the TIME() localization behavior described in the issue and the linked date/time formatting documentation. Clarify the supported formatting requirements, including seconds and possible 24-hour or relative formats; the work is done when the agreed behavior is implemented and verified for the relevant TIME() cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
internationalization, localization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.