MiKTeX 26.5-next
A scalable TeX distribution
Loading...
Searching...
No Matches
DateUtil.h
Go to the documentation of this file.
1
13
14#pragma once
15
16#include <miktex/Util/config.h>
17
18#include <ctime>
19
20MIKTEX_UTIL_BEGIN_NAMESPACE;
21
22class MIKTEXNOVTABLE DateUtil
23{
24
25public:
26
27 DateUtil() = delete;
28 DateUtil(const DateUtil& other) = delete;
29 DateUtil& operator=(const DateUtil& other) = delete;
30 DateUtil(DateUtil&& other) = delete;
31 DateUtil& operator=(DateUtil&& other) = delete;
32 ~DateUtil() = delete;
33
34 static constexpr std::time_t UNDEFINED_TIME_T_VALUE = static_cast<std::time_t>(0);
35
36 static bool IsDefined(std::time_t time)
37 {
38 return time != static_cast<std::time_t>(0) && time != static_cast<std::time_t>(-1);
39 }
40};
41
42MIKTEX_UTIL_END_NAMESPACE;