Welcome to mirror list, hosted at ThFree Co, Russian Federation.

timefn.hpp « Original « Rar29 « Compress « 7zip - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9ab5032f454474e3c6d0d6d898abfd3ccad242fe (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef _RAR_TIMEFN_
#define _RAR_TIMEFN_

struct RarLocalTime
{
  uint Year;
  uint Month;
  uint Day;
  uint Hour;
  uint Minute;
  uint Second;
  uint Reminder;
  uint wDay;
  uint yDay;
};


class RarTime
{
  private:
    Int64 GetRaw();
    void SetRaw(Int64 RawTime);

    RarLocalTime rlt;

    Int64 Time;
  public:
    RarTime();
#ifdef _WIN_32
    RarTime& operator =(FILETIME &ft);
    void GetWin32(FILETIME *ft);
#endif
#if defined(_UNIX) || defined(_EMX)
    RarTime& operator =(time_t ut);
    time_t GetUnix();
#endif
    bool operator == (RarTime &rt);
    bool operator < (RarTime &rt);
    bool operator <= (RarTime &rt);
    bool operator > (RarTime &rt);
    bool operator >= (RarTime &rt);
    void GetLocal(RarLocalTime *lt) {*lt=rlt;}
    void SetLocal(RarLocalTime *lt) {rlt=*lt;}
    uint GetDos();
    void SetDos(uint DosTime);
    void GetText(char *DateStr,bool FullYear);
    void SetIsoText(char *TimeText);
    void SetAgeText(char *TimeText);
    void SetCurrentTime();
    void Reset() {rlt.Year=0;}
    bool IsSet() {return(rlt.Year!=0);}
};

const char *GetMonthName(int Month);
bool IsLeapYear(int Year);

#endif