/* * Copyright (c) 2022, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace Unicode { // These are just the subset of fields in the CLDR required for ECMA-402. enum class TimeUnit { Second, Minute, Hour, Day, Week, Month, Quarter, Year, }; struct RelativeTimeFormat { PluralCategory plurality; StringView pattern; }; Optional time_unit_from_string(StringView time_unit); StringView time_unit_to_string(TimeUnit time_unit); Vector get_relative_time_format_patterns(StringView locale, TimeUnit time_unit, StringView tense_or_number, Style style); }