KI18n

timezonedata.cpp
1/*
2 SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "timezonedata_p.h"
8
9#include "data/country_timezone_map.cpp"
10#include "data/subdivision_timezone_map.cpp"
11#include "data/timezone_name_table.cpp"
12
13#include <cassert>
14
15static_assert(isSortedLookupTable(country_timezone_map));
16static_assert(isSortedLookupTable(subdivision_timezone_map));
17
18const char *TimezoneData::ianaIdLookup(uint16_t offset)
19{
20 assert(offset < sizeof(timezone_name_table));
21 return timezone_name_table + offset;
22}
23
24const MapEntry<uint16_t> *TimezoneData::countryTimezoneMapBegin()
25{
26 return std::begin(country_timezone_map);
27}
28
29const MapEntry<uint16_t> *TimezoneData::countryTimezoneMapEnd()
30{
31 return std::end(country_timezone_map);
32}
33
34const MapEntry<uint32_t> *TimezoneData::subdivisionTimezoneMapBegin()
35{
36 return std::begin(subdivision_timezone_map);
37}
38
39const MapEntry<uint32_t> *TimezoneData::subdivisionTimezoneMapEnd()
40{
41 return std::end(subdivision_timezone_map);
42}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:05:34 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.