namespace Indotalent.ConfigBackEnd.Extensions;

public static class DateTimeExtensions
{
    private const string DefaultFormat = "dd MMM yyyy, HH:mm";

    public static string ToString(this DateTimeOffset? dateTimeOffset, string format = DefaultFormat)
    {
        if (!dateTimeOffset.HasValue) return "-";

        return dateTimeOffset.Value.ToLocalTime().ToString(format);
    }

}
