diff --git a/base/inc/TDatime.h b/base/inc/TDatime.h index 0c726ec09e70800241539a360f869fe40b623191..4d64eb3da3020891da90affcd374252f1b986760 100644 --- a/base/inc/TDatime.h +++ b/base/inc/TDatime.h @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TDatime.h,v 1.3 2001/05/29 16:21:34 rdm Exp $ +// @(#)root/base:$Name: $:$Id: TDatime.h,v 1.4 2001/12/10 14:46:06 rdm Exp $ // Author: Rene Brun 05/01/95 /************************************************************************* @@ -49,6 +49,12 @@ public: UInt_t Get() const { return fDatime; } Int_t GetDate() const; Int_t GetTime() const; + Int_t GetYear() const { return (fDatime>>26) + 1995; } + Int_t GetMonth() const { return (fDatime<<6)>>28; } + Int_t GetDay() const { return (fDatime<<10)>>27; } + Int_t GetHour() const { return (fDatime<<15)>>27; } + Int_t GetMinute() const { return (fDatime<<20)>>26; } + Int_t GetSecond() const { return (fDatime<<26)>>26; } void FillBuffer(char *&buffer); void Print(Option_t *option="") const; void ReadBuffer(char *&buffer); diff --git a/base/src/TDatime.cxx b/base/src/TDatime.cxx index 8edd3fd5c0971de2f6da3877ead859834bcdbdaf..50fb92609dbd33f0d3eda4bb7e2877757b6fc7d8 100644 --- a/base/src/TDatime.cxx +++ b/base/src/TDatime.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: v3-03-05 $:$Id: TDatime.cxx,v 1.4 2001/12/10 14:46:06 rdm Exp $ +// @(#)root/base:$Name: $:$Id: TDatime.cxx,v 1.5 2002/05/30 10:50:20 rdm Exp $ // Author: Rene Brun 05/01/95 /************************************************************************* @@ -103,7 +103,7 @@ const char *TDatime::AsSQLString() const { // Return the date & time in SQL compatible string format, like: // 1997-01-15 20:16:28. The returned string buffer is static and - // will bew reused. + // will be reused. static char sqldate[20];