mirror of
https://github.com/bitwarden/mobile
synced 2025-12-12 22:33:25 +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:
@@ -98,5 +98,15 @@ namespace Bit.Droid.Services
|
||||
Console.WriteLine(".NET Fallback Language/Locale:" + netLanguage + " (application-specific)");
|
||||
return netLanguage;
|
||||
}
|
||||
|
||||
public string GetLocaleShortDate(DateTime? date)
|
||||
{
|
||||
return date?.ToShortDateString() ?? string.Empty;
|
||||
}
|
||||
|
||||
public string GetLocaleShortTime(DateTime? time)
|
||||
{
|
||||
return time?.ToShortTimeString() ?? string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user