2using System.Globalization;
10 public object Convert(
object? value, Type targetType,
object? parameter, CultureInfo culture)
12 if (value is not DateTime DtNullable)
15 DateTime Dt = DtNullable.ToLocalTime();
16 DateTime Now = DateTime.Now;
17 TimeSpan Span = Now - Dt;
29 if (Span.TotalDays < 1)
30 TimeString = Dt.ToString(
"t", culture);
32 TimeString = Dt.ToString(
"d", culture);
36 public object ConvertBack(
object? value, Type targetType,
object? parameter, CultureInfo culture)
37 =>
throw new NotImplementedException();
A strongly-typed resource class, for looking up localized strings, etc.
static string LastUpdatedFormat
Looks up a localized string similar to Last updated: {0}.
static string Never
Looks up a localized string similar to Never.
Base class that references services in the app.
static IReportingStringLocalizer Localizer
Localization service