33 #include "dcmtk/config/osconfig.h" 36 #include "dcmtk/ofstd/ofstdinc.h" 39 #ifdef HAVE_SYS_TYPES_H 40 # include <sys/types.h> 44 #include "dcmtk/ofstd/ofstring.h" 77 OFTime(
const unsigned int hour,
78 const unsigned int minute,
80 const double timeZone = 0);
145 virtual void clear();
152 virtual OFBool
isValid()
const;
162 OFBool
setTime(
const unsigned int hour,
163 const unsigned int minute,
165 const double timeZone = 0);
172 OFBool
setHour(
const unsigned int hour);
179 OFBool
setMinute(
const unsigned int minute);
207 const unsigned int minute);
217 const double timeZone = 0,
218 const OFBool normalize = OFTrue);
228 const double timeZone = 0,
229 const OFBool normalize = OFTrue);
293 const OFBool normalize = OFTrue)
const;
302 const OFBool normalize = OFTrue)
const;
332 const OFBool showSeconds = OFTrue,
333 const OFBool showFraction = OFFalse,
334 const OFBool showTimeZone = OFFalse,
335 const OFBool showDelimiter = OFTrue)
const;
374 const unsigned int minute,
376 const double timeZone);
388 const unsigned int minute,
390 const double timeZone = 0,
391 const OFBool normalize = OFTrue);
403 const unsigned int minute,
405 const double timeZone = 0,
406 const OFBool normalize = OFTrue);
431 STD_NAMESPACE ostream& operator<<(STD_NAMESPACE ostream& stream,
const OFTime &timeVal);
unsigned int getIntSecond() const
get the integral part of the currently stored second value
virtual void clear()
reset the time value.
OFTime getLocalTime() const
get the currently stored time in local time.
static OFBool isTimeValid(const unsigned int hour, const unsigned int minute, const double second, const double timeZone)
check whether the given time is valid.
OFBool setISOFormattedTime(const OFString &formattedTime)
set the time value to the given ISO formatted time string.
virtual OFTime & operator=(const OFTime &timeVal)
assignment operator
virtual OFBool operator<=(const OFTime &timeVal) const
comparison operator (less than or equal) Please note that the time values are first transformed to th...
This class provides a collection of time functions.
virtual OFBool operator>=(const OFTime &timeVal) const
comparison operator (greater than or equal) Please note that the time values are first transformed to...
double Second
currently stored second value (incl. fraction of seconds)
virtual OFBool isValid() const
check whether the currently stored time value is valid.
double getTimeInHours(const OFBool useTimeZone=OFFalse, const OFBool normalize=OFTrue) const
get the currently stored time in hours.
static OFTime getCurrentTime()
get the current system time
double TimeZone
currently stored time zone value
OFTime()
default constructor.
OFBool setTimeInSeconds(const double seconds, const double timeZone=0, const OFBool normalize=OFTrue)
set the time to the specified number of seconds
virtual OFBool operator<(const OFTime &timeVal) const
comparison operator (less than) Please note that the time values are first transformed to the Coordin...
unsigned int Minute
currently stored minute value
OFBool setHour(const unsigned int hour)
set the time value to the specified hour.
OFBool getISOFormattedTime(OFString &formattedTime, const OFBool showSeconds=OFTrue, const OFBool showFraction=OFFalse, const OFBool showTimeZone=OFFalse, const OFBool showDelimiter=OFTrue) const
get the current time value in ISO format.
virtual ~OFTime()
destructor
double getTimeZone() const
get the currently stored time zone value.
static double getLocalTimeZone()
get the local time zone.
OFBool setTimeInHours(const double hours, const double timeZone=0, const OFBool normalize=OFTrue)
set the time to the specified number of hours
This class is a combination of OFDate and OFTime.
unsigned int getMicroSecond() const
get the micro second part of the currently stored second value
double getSecond() const
get the currently stored second value
unsigned int getMilliSecond() const
get the milli second part of the currently stored second value
virtual OFBool operator>(const OFTime &timeVal) const
comparison operator (greater than) Please note that the time values are first transformed to the Coor...
virtual OFBool operator!=(const OFTime &timeVal) const
comparison operator (unequal) Please note that the time values are first transformed to the Coordinat...
a simple string class that implements a subset of std::string.
OFBool setTime(const unsigned int hour, const unsigned int minute, const double second, const double timeZone=0)
set the time value to the specified time.
unsigned int getMinute() const
get the currently stored minute value
double getTimeInSeconds(const OFBool useTimeZone=OFFalse, const OFBool normalize=OFTrue) const
get the currently stored time in seconds
OFBool setCurrentTime()
set the time value to the current system time.
OFTime getCoordinatedUniversalTime() const
get the currently stored time as Coordinated Universal Time.
unsigned int getHour() const
get the currently stored hour value
OFBool setMinute(const unsigned int minute)
set the time value to the specified minute.
OFBool setTimeZone(const double timeZone)
set the time zone to the specified value.
unsigned int Hour
currently stored hour value
virtual OFBool operator==(const OFTime &timeVal) const
comparison operator (equal).
OFBool setSecond(const double second)
set the time value to the specified second.