settings_data: Extract TimePreferences.

This type will get used in people.ts in "get_user_time_preferences".

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li 2023-03-10 16:51:07 -05:00 committed by Tim Abbott
parent 215f776f0e
commit 04782a48e2
1 changed files with 4 additions and 2 deletions

View File

@ -18,10 +18,12 @@ export function initialize(current_user_join_date: Date): void {
about page_params and settings_config details.
*/
export function get_time_preferences(user_timezone: string): {
export type TimePreferences = {
timezone: string;
format: string;
} {
};
export function get_time_preferences(user_timezone: string): TimePreferences {
if (user_settings.twenty_four_hour_time) {
return {
timezone: user_timezone,