Loading...
Searching...
No Matches
locale.h
1#pragma once
2
3#include <stdbool.h>
4#include <furi.h>
5#include <furi_hal.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef enum {
12 LocaleMeasurementUnitsMetric = 0,
13 LocaleMeasurementUnitsImperial = 1,
14} LocaleMeasurementUnits;
15
16typedef enum {
17 LocaleTimeFormat24h = 0,
18 LocaleTimeFormat12h = 1,
19} LocaleTimeFormat;
20
21typedef enum {
22 LocaleDateFormatDMY = 0,
23 LocaleDateFormatMDY = 1,
24 LocaleDateFormatYMD = 2,
25} LocaleDateFormat;
26
31LocaleMeasurementUnits locale_get_measurement_unit(void);
32
37void locale_set_measurement_unit(LocaleMeasurementUnits format);
38
45float locale_fahrenheit_to_celsius(float temp_f);
46
53float locale_celsius_to_fahrenheit(float temp_c);
54
59LocaleTimeFormat locale_get_time_format(void);
60
65void locale_set_time_format(LocaleTimeFormat format);
66
74void locale_format_time(
75 FuriString* out_str,
76 const DateTime* datetime,
77 const LocaleTimeFormat format,
78 const bool show_seconds);
79
84LocaleDateFormat locale_get_date_format(void);
85
90void locale_set_date_format(LocaleDateFormat format);
91
99void locale_format_date(
100 FuriString* out_str,
101 const DateTime* datetime,
102 const LocaleDateFormat format,
103 const char* separator);
104
105#ifdef __cplusplus
106}
107#endif
Furi HAL API.
Definition datetime.h:10
Definition string.c:4