From fb3e297e3d5a00858e84641a5ee2bc40051c3752 Mon Sep 17 00:00:00 2001 From: devlooped-bot Date: Sun, 9 Jun 2024 06:45:55 +0000 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Bump=20files=20with=20dotn?= =?UTF-8?q?et-file=20sync?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/readme.md b/readme.md index b8ce98ba..6f237e5c 100644 --- a/readme.md +++ b/readme.md @@ -305,6 +305,7 @@ Given the following Resx file: | Infrastructure_MissingService | Service {0} is required. | For logging only! | | Shopping_NoShipping | We cannot ship {0} to {1}. | | | Shopping_OutOfStock | Product is out of stock at this time. | | +| Shopping_AvailableOn | Product available on {date:yyyy-MM}. | | The following code would be generated: @@ -340,6 +341,14 @@ partial class ThisAssembly /// public static string OutOfStock => Strings.GetResourceManager("ThisStore.Properties.Resources").GetString("OutOfStock"); + + /// + /// Product available on {date:yyyy-MM}. + /// + public static string AvailableOn(object date) + => string.Format(CultureInfo.CurrentCulture, + Strings.GetResourceManager("ThisAssemblyTests.Resources").GetString("WithNamedFormat").Replace("{date:yyyy-MM}", "{0}"), + ((IFormattable)date).ToString("yyyy-MM", CultureInfo.CurrentCulture)); } } }