LeviLamina
Loading...
Searching...
No Matches
DateManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
7#include "mc/platform/Result.h"
8
10public:
11 // DateManager inner types define
12 enum class TimeZoneType : int {
13 Utc = 0,
14 Local = 1,
15 };
16
17public:
18 // member variables
19 // NOLINTBEGIN
26 // NOLINTEND
27
28public:
29 // prevent constructor by default
30 DateManager& operator=(DateManager const&);
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 // vIndex: 0
38 virtual ~DateManager() /*override*/ = default;
39
40 // vIndex: 1
41 virtual int64 _getUnixTime();
42 // NOLINTEND
43
44public:
45 // static functions
46 // NOLINTBEGIN
47 MCNAPI static int
48 _parseTimeZone(char const* str, uint64 len, ::DateManager::TimeZoneType* type, int* hours, int* minutes);
49
50 MCNAPI static ::std::string getCurrentTimestampFileName();
51
52 MCNAPI static int64 getRealTime();
53
54 MCNAPI static ::Bedrock::Result<int64> parseImfFixdate(::std::string const& dateHeader);
55
56 MCNAPI static bool toDateTime(
57 ::std::string const& strTime,
58 ::tm* result,
59 ::DateManager::TimeZoneType* resultType,
60 int* resultTimeZoneMinutes
61 );
62
63 MCNAPI static int64 toEpochTime(::tm const* dateTime, ::DateManager::TimeZoneType inputType);
64
65 MCNAPI static ::std::string
66 toString(::tm const& time, ::std::string const& format, ::std::optional<::std::locale> const& locale);
67
68 MCNAPI static ::std::string toString_DateTime(::tm const& time, ::DateManager::TimeZoneType outputType);
69 // NOLINTEND
70
71public:
72 // virtual function thunks
73 // NOLINTBEGIN
74
75 // NOLINTEND
76};
Definition EnableNonOwnerReferences.h:7
Definition DateManager.h:9
static MCAPI int64 toEpochTime(::tm const *dateTime, ::DateManager::TimeZoneType inputType)
static MCAPI ::Bedrock::Result< int64 > parseImfFixdate(::std::string const &dateHeader)
static MCAPI int _parseTimeZone(char const *str, uint64 len, ::DateManager::TimeZoneType *type, int *hours, int *minutes)
static MCAPI ::std::string getCurrentTimestampFileName()
static MCAPI ::std::string toString(::tm const &time, ::std::string const &format, ::std::optional<::std::locale > const &locale)
static MCAPI ::std::string toString_DateTime(::tm const &time, ::DateManager::TimeZoneType outputType)
static MCAPI bool toDateTime(::std::string const &strTime, ::tm *result, ::DateManager::TimeZoneType *resultType, int *resultTimeZoneMinutes)
static MCAPI int64 getRealTime()
Definition Alias.h:14