Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tyrrrz
GitHub Repository: Tyrrrz/DiscordChatExporter
Path: blob/master/DiscordChatExporter.Gui/Utils/Internationalization.cs
544 views
using System.Globalization;

namespace DiscordChatExporter.Gui.Utils;

internal static class Internationalization
{
    public static bool Is24Hours =>
        string.IsNullOrWhiteSpace(CultureInfo.CurrentCulture.DateTimeFormat.AMDesignator)
        && string.IsNullOrWhiteSpace(CultureInfo.CurrentCulture.DateTimeFormat.PMDesignator);

    public static string AvaloniaClockIdentifier => Is24Hours ? "24HourClock" : "12HourClock";
}