~aleteoryx/muditaos

ref: 09761da170faa207c5d899d2132a3cc67dad5a31 muditaos/module-utils/time/TimeRangeParser.hpp -rw-r--r-- 738 bytes
09761da1 — DariuszSabala [BH-369] Fixed UTF8 unit test CI run 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once
#include "Utils.hpp"
#include <module-apps/application-calendar/data/dateCommon.hpp>

namespace utils::time
{
    enum class Version
    {
        abbrev,
        normal
    };

    class TimeRangeParser
    {

      private:
        std::string AMPMtoString(bool isAm);

      public:
        std::string getCalendarTimeString(TimePoint startDate,
                                          TimePoint endDate,
                                          Version version = Version::normal,
                                          bool isMode24H  = false);
    };
} // namespace utils::time