Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
DateHelper.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/util/date_helper/DurationFields.h"
7#include "mc/util/date_helper/DurationFormat.h"
8
9// auto generated forward declare list
10// clang-format off
11class I18n;
12// clang-format on
13
14namespace DateHelper {
15// functions
16// NOLINTBEGIN
17#ifdef LL_PLAT_C
18MCNAPI ::std::string getDateAsFormattedString(int64 time);
19
20MCNAPI ::std::string getDurationAsString(
21 ::std::chrono::seconds duration,
22 ::DateHelper::DurationFields fields,
23 ::DateHelper::DurationFormat format
24);
25
26MCNAPI ::std::string getDurationAsString(
27 ::std::chrono::seconds duration,
28 ::DateHelper::DurationFields fields,
29 ::DateHelper::DurationFormat format,
30 ::I18n& i18n
31);
32
33MCNAPI ::std::string getHowLongAgoAsString(int64 now, int64 time);
34
35MCNAPI ::std::string getHowLongAgoAsStringNarration(int64 now, int64 time);
36
37MCNAPI ::std::string getTimeAltFormatAsString(int64 time);
38
39MCNAPI ::std::string
40getTimeRemainingAsString(int64 now, int64 time, uint numberOfFields, bool addRemainingStr, bool isTelemetry);
41
42MCNAPI ::std::string getTimeSpecificFormatAsString(int64 now, int64 time);
43#endif
44
45MCNAPI ::std::string getTimestampFileName(int64 const& timestamp);
46
47MCNAPI ::std::string removeSeconds(::std::string const& timeStr);
48
49#ifdef LL_PLAT_C
50MCNAPI ::std::string toLocalDate(int64 time);
51#endif
52
53MCNAPI ::std::string toLocalShortDateTime(int64 time);
54
55#ifdef LL_PLAT_C
56MCNAPI ::std::string toLocalTime(int64 time);
57#endif
58// NOLINTEND
59
60} // namespace DateHelper
Definition I18n.h:19