Belle II Software  release-05-02-19
Date.h
1 #ifndef _Belle2_Date_hh
2 #define _Belle2_Date_hh
3 
4 #include <time.h>
5 
6 namespace Belle2 {
12  class Date {
13 
14  public:
15  Date(time_t time);
16  Date(const Date& date);
17  Date();
18  ~Date();
19 
20  public:
21  void set();
22  void set(time_t time);
23  time_t get() const { return m_time; }
24  int getSecond() const;
25  int getMinitue() const;
26  int getHour() const;
27  int getDay() const;
28  int getMonth() const;
29  int getYear() const;
30  const char* toString(const char* format = NULL) const;
31 
32  public:
33  const Date& operator=(const Date& date)
34  {
35  set(date.m_time);
36  return *this;
37  }
38 
39  private:
40  time_t m_time;
41  struct tm* m_tm;
42  mutable char m_str[31];
43 
44  };
45 
47 };
48 
49 #endif
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::Date
Definition: Date.h:12