[PTRun][TimeDate]Unix Time in milliseconds, fix negative unix time input, error message improvement (#29149)

* add unix time in ms

* update dev docs

* unit tests

* fix spell check

* tool tip

* fix negative unix time input, improve regex, update unit tests, improve error message

* Update error handling and tests

* add tests and fix spelling

* small fixes
This commit is contained in:
Heiko
2023-10-18 11:45:00 +02:00
committed by GitHub
parent cd99a2e848
commit 50cb279d2a
11 changed files with 94 additions and 29 deletions

View File

@@ -160,7 +160,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties {
}
/// <summary>
/// Looks up a localized string similar to Valid prefixes: &apos;u&apos; for Unix Timestamp, &apos;ft&apos; for Windows file time.
/// Looks up a localized string similar to Valid prefixes: &apos;u&apos; for Unix Timestamp, &apos;ums&apos; for Unix Timestamp in milliseconds, &apos;ft&apos; for Windows file time.
/// </summary>
internal static string Microsoft_plugin_timedate_ErrorResultSubTitle {
get {
@@ -555,6 +555,15 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Unix epoch time in milliseconds.
/// </summary>
internal static string Microsoft_plugin_timedate_Unix_Milliseconds {
get {
return ResourceManager.GetString("Microsoft_plugin_timedate_Unix_Milliseconds", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Week of the month.
/// </summary>

View File

@@ -153,7 +153,7 @@
<value>Era abbreviation</value>
</data>
<data name="Microsoft_plugin_timedate_ErrorResultSubTitle" xml:space="preserve">
<value>Valid prefixes: 'u' for Unix Timestamp, 'ft' for Windows file time</value>
<value>Valid prefixes: 'u' for Unix Timestamp, 'ums' for Unix Timestamp in milliseconds, 'ft' for Windows file time</value>
</data>
<data name="Microsoft_plugin_timedate_ErrorResultTitle" xml:space="preserve">
<value>Error: Invalid number input</value>
@@ -312,4 +312,7 @@
<data name="Microsoft_plugin_timedate_Year" xml:space="preserve">
<value>Year</value>
</data>
<data name="Microsoft_plugin_timedate_Unix_Milliseconds" xml:space="preserve">
<value>Unix epoch time in milliseconds</value>
</data>
</root>