Skip to content

Conversation

sgregoire
Copy link

@sgregoire sgregoire commented Jul 31, 2025

Related Issue

#9233

Description

This one only add test to reproduce the expected behavior, and a proposed solution for JS in another commit.

Sample Card

{
    "type": "AdaptiveCard",
    "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.5",
    "body": [
        {
            "type": "TextBlock",
            "text": "{{DATE(2023-10-01T12:00:00)}} at {{TIME(2023-10-01T12:00:00)}}",
            "wrap": true
        }
    ]
}

How Verified

How you verified the fix, including one or all of the following:

  • 1. New unit tests that were added if any. If none were added please add a quick line explaining why not.
  • 2. Existing relevant unit/regression tests that you ran
  • 3. Manual scenario verification if any; Do include .gif's or screenshots of the testing you performed here if you think that it
    will aid in code reviews or corresponding fixes on other platforms for eg.
image

Warning

The PR only tackles web, the regex might need to be updated from the shared CPP code.

@sgregoire
Copy link
Author

@microsoft-github-policy-service agree company="Amadeus"

const date = isoDate();
const res = formatText("en-GB", `{{DATE(${date}, SHORT)}} {{TIME(${date})}}`);
expect(res).toBe("Sun, 1 Oct 2023 12:00");
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants