Mine Solution is to use extension method, it will save some time in writing a wrapper method and passing date and time as input.
Result:
Package will be delivered this 29 day of 09, 2022 at the company shop.
As the execution will be as:
global using ExtensionMethods;
Console.WriteLine(DateTime.Today.ToString("dd/MM/yyyy").ToCustomDateFormat());
And the Extension Method will be:
namespace ExtensionMethods
{
public static class MyExtensions
{
public static string ToCustomDateFormat(this string str)
{
string day = str.Substring(0, str.IndexOf('/'));
string month = str.Substring(str.IndexOf('/') + 1, str.IndexOf('/', str.IndexOf('/')));
string year = str.Substring(str.LastIndexOf('/') + 1, str.Length - str.LastIndexOf('/') - 1);
string result = $"Package will be delivered this {day} day of {month}, {year} at the company shop.";
return result;
}
}
}