Changeset 7432 for trunk/MagicSoft/Mars/mbase/MTime.h
- Timestamp:
- 11/28/05 11:15:09 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MTime.h
r7384 r7432 83 83 Bool_t SetSqlTimeStamp(const char *str); 84 84 void SetCT1Time(UInt_t mjd, UInt_t t1, UInt_t t0); 85 Bool_t SetStringFmt(const char *time, const char *fmt );85 Bool_t SetStringFmt(const char *time, const char *fmt, const char *loc=0); 86 86 Bool_t UpdMagicTime(Byte_t h, Byte_t m, Byte_t s, UInt_t ns); 87 87 Bool_t SetMjd(UInt_t mjd, ULong_t ms, UInt_t ns=0); 88 88 void SetMjd(Double_t m); 89 89 void SetAxisTime(Double_t time); 90 void SetEaster(Short_t year=0); 90 91 91 92 // Getter functions … … 93 94 Double_t GetGmst() const; 94 95 TString GetString() const; 95 TString GetStringFmt(const char *fmt=0 ) const;96 TString GetStringFmt(const char *fmt=0, const char *loc=0) const; 96 97 TString GetSqlDateTime() const; 97 98 TString GetSqlTimeStamp() const; … … 112 113 } 113 114 114 UInt_t Year() const { UShort_t y; Byte_t m, d; GetDate(y,m,d); return y; } 115 UInt_t Month() const { UShort_t y; Byte_t m, d; GetDate(y,m,d); return m; } 116 UInt_t Day() const { UShort_t y; Byte_t m, d; GetDate(y,m,d); return d; } 117 UInt_t Hour() const { Byte_t h, m, s; GetTime(h,m,s); return h; } 118 UInt_t Min() const { Byte_t h, m, s; GetTime(h,m,s); return m; } 119 UInt_t Sec() const { Byte_t h, m, s; GetTime(h,m,s); return s; } 115 UInt_t Year() const { UShort_t y; Byte_t m, d; GetDate(y,m,d); return y; } 116 UInt_t Month() const { UShort_t y; Byte_t m, d; GetDate(y,m,d); return m; } 117 UInt_t Day() const { UShort_t y; Byte_t m, d; GetDate(y,m,d); return d; } 118 Byte_t WeekDay() const { return TMath::Nint(TMath::Floor(GetMjd()+3))%7; } // Return Day of the week: Sun=0, Mon=1, ..., Sat=6 119 UInt_t Hour() const { Byte_t h, m, s; GetTime(h,m,s); return h; } 120 UInt_t Min() const { Byte_t h, m, s; GetTime(h,m,s); return m; } 121 UInt_t Sec() const { Byte_t h, m, s; GetTime(h,m,s); return s; } 120 122 121 123 Bool_t IsMidnight() const { return (Long_t)fTime==0 && fNanoSec==0; } … … 155 157 bool operator!() const; 156 158 159 static MTime GetEaster(Short_t year=-1); 160 157 161 ClassDef(MTime, 3) //A generalized MARS time stamp 158 162 };
Note:
See TracChangeset
for help on using the changeset viewer.