Add filename-compatible date & time format (#25020)

* enable the functionality to have filename-compatible date & time

* fix PowerToys.sln

* fix DateTime format

* remove unrelated code

* modify date time format

* fix tests

* fix hours to 24h format and modify tests to cover the case better. Simplify tests slightly
This commit is contained in:
Jachym Metlicka
2023-03-28 14:52:21 +02:00
committed by GitHub
parent 543d5d1b6d
commit b2b7dc3ccf
6 changed files with 76 additions and 41 deletions

View File

@@ -60,6 +60,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests
[DataRow("iso zone", "ISO 8601 with time zone - ", "Images\\timeDate.dark.png")]
[DataRow("iso utc zone", "ISO 8601 UTC with time zone - ", "Images\\timeDate.dark.png")]
[DataRow("rfc", "RFC1123 -", "Images\\timeDate.dark.png")]
[DataRow("compatible", "Date and time in filename-compatible format", "Images\\timeDate.dark.png")]
public void IconThemeDarkTest(string typedString, string subTitleMatch, string expectedResult)
{
// Setup
@@ -105,6 +106,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests
[DataRow("iso zone", "ISO 8601 with time zone - ", "Images\\timeDate.light.png")]
[DataRow("iso utc zone", "ISO 8601 UTC with time zone - ", "Images\\timeDate.light.png")]
[DataRow("rfc", "RFC1123 -", "Images\\timeDate.light.png")]
[DataRow("compatible", "Date and time in filename-compatible format", "Images\\timeDate.light.png")]
public void IconThemeLightTest(string typedString, string subTitleMatch, string expectedResult)
{
// Setup