using System.Globalization; using Connected.Globalization.Languages; namespace Connected.Globalization; /// /// The service used for globalization related purposes. /// public interface IGlobalizationService { /// /// Converts an UTC date to a local one base on the current identity and timezone. /// /// The value to be converted. /// a value converted to local time. DateTime FromUtc(DateTime value); /// /// Converts a local date to an UTC one base on the current identity and timezone. /// /// The value to be converted. /// a value converted to UTC time. DateTime ToUtc(DateTime value); /// /// Converts an UTC date to a local one base on the current identity and timezone. /// /// The value to be converted. /// a value converted to local time. DateTimeOffset FromUtc(DateTimeOffset value); /// /// Converts a local date to an UTC one base on the current identity and timezone. /// /// The value to be converted. /// a value converted to UTC time. DateTimeOffset ToUtc(DateTimeOffset value); /// /// Returns currently used timezone which is based on the current identity. /// TimeZoneInfo TimeZone { get; } /// /// Returns the converted value to a currently set . /// DateTimeOffset Now { get; } /// /// Returns the currently active language based on a user identity. /// /// The if user has a language set, null otherwise. Task GetCurrentLanguage(); /// /// Returns the currently active based on a user identity. /// /// The if user has a language set, /// otherwise. Task GetCurrentCulture(); }