Skip to content
Snippets Groups Projects
Commit d5d86c6b authored by Fons Rademakers's avatar Fons Rademakers
Browse files

added the GetYear(), GetMonth(), GetDay(), GetHour(), GetMinute() and

GetSecond() methods to avoid bit manipulation by the users.


git-svn-id: http://root.cern.ch/svn/root/trunk@5039 27541ba8-7e3a-0410-8455-c3a389f83636
parent 47bd50f0
No related branches found
No related tags found
No related merge requests found
// @(#)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);
......
// @(#)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];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment