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

@@ -52,12 +52,12 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests
}
[DataTestMethod]
[DataRow("(time", 16)]
[DataRow("(date", 24)]
[DataRow("(time", 17)]
[DataRow("(date", 25)]
[DataRow("(year", 7)]
[DataRow("(now", 30)]
[DataRow("(current", 30)]
[DataRow("(", 30)]
[DataRow("(now", 31)]
[DataRow("(current", 31)]
[DataRow("(", 31)]
[DataRow("(now::10:10:10", 1)] // Windows file time
[DataRow("(current::10:10:10", 0)]
public void CountWithPluginKeyword(string typedString, int expectedResultCount)