diff --git a/docs/serializer-settings.md b/docs/serializer-settings.md index 0bd2e6ec6a..fdeb6481de 100644 --- a/docs/serializer-settings.md +++ b/docs/serializer-settings.md @@ -376,7 +376,23 @@ VerifierSettings.DontScrubDateTimes(); `AddExtraDatetimeFormat` allows specifiying custom date formats to be scrubbed. -snipper: AddExtraDatetimeFormat + + +```cs +[ModuleInitializer] +public static void UseAddExtraDatetimeFormat() => + VerifierSettings.AddExtraDatetimeFormat("yyyy-MM-dd"); + +[Fact] +public Task WithExtraDatetimeFormat() => + Verify( + new + { + date = "2022-11-08" + }); +``` +snippet source | anchor + ### Named Date and Times