wrapping, added last update field

This commit is contained in:
Llywelwyn 2022-07-25 11:45:22 +01:00
parent dd2aef92a6
commit 8c58930bc8
3 changed files with 17 additions and 5 deletions

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Humanizer;
namespace CharacterRecordsGenerator
{
@ -33,6 +34,8 @@ namespace CharacterRecordsGenerator
/// <returns></returns>
public static string SpaceIfValue(this string val) => string.IsNullOrWhiteSpace(val) ? string.Empty : $"{val} ";
public static string HumanisedDate(DateTime date) => $"{date.ToString("MMMM")} {date.Day.Ordinalize()}, {date.Year}";
public static string IfEmpty(this string target, string fallback) =>
target.IsEmpty() ? fallback : target;