mirror of
https://github.com/bitwarden/mobile
synced 2025-12-10 21:33:36 +00:00
add date and time formatting methods to localize service (#1616)
- uses Apple APIs for formatting on iOS - uses .Net APIs for formatting Android - implemented across project - remove unnecesary calls to DateTimeConverter
This commit is contained in:
@@ -1,9 +1,22 @@
|
||||
using System.Globalization;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Bit.App.Abstractions
|
||||
{
|
||||
public interface ILocalizeService
|
||||
{
|
||||
CultureInfo GetCurrentCultureInfo();
|
||||
|
||||
/// <summary>
|
||||
/// Format date using device locale.
|
||||
/// Needed for iOS as it provides locales unsupported in .Net
|
||||
/// </summary>
|
||||
string GetLocaleShortDate(DateTime? date);
|
||||
|
||||
/// <summary>
|
||||
/// Format time using device locale.
|
||||
/// Needed for iOS as it provides locales unsupported in .Net
|
||||
/// </summary>
|
||||
string GetLocaleShortTime(DateTime? time);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user