|
|
@@ -1,17 +1,15 @@
|
|
|
#ifndef Time_H
|
|
|
#define Time_H
|
|
|
|
|
|
-#include <time.h>
|
|
|
-
|
|
|
#include "OperatingSystem.h"
|
|
|
#include "ReferenceCounter.h"
|
|
|
|
|
|
namespace Framework
|
|
|
{
|
|
|
- class Text; //! Text.h
|
|
|
- class Clock; //! From this file
|
|
|
- class Date; //! From this file
|
|
|
- class Time; //! From this file
|
|
|
+ class Text; //! Text.h
|
|
|
+ class Clock; //! From this file
|
|
|
+ class Date; //! From this file
|
|
|
+ class Time; //! From this file
|
|
|
class Timer; //! From this file
|
|
|
|
|
|
//! This class stores a time of day in the form of hours, minutes and
|
|
|
@@ -359,34 +357,41 @@ namespace Framework
|
|
|
//! \param tag The day to add.
|
|
|
//! Example: ( 1.1.2000 ).plusDay( 32 ); new date: 2.2.2000
|
|
|
DLLEXPORT void plusDay(int tag);
|
|
|
- //! Subtracts the given date from the current date and stores the result.
|
|
|
+ //! Subtracts the given date from the current date and stores the
|
|
|
+ //! result.
|
|
|
//! \param datum The date to subtract.
|
|
|
//! Example: ( 2.12.1996 ).minusDate( ( 1.1.1 ) ); new date: 1.11.1995
|
|
|
DLLEXPORT void minusDate(Date* datum);
|
|
|
- //! Subtracts the given date from the current date and stores the result.
|
|
|
- //! \param jahr The year to subtract. \param monat The month to subtract.
|
|
|
+ //! Subtracts the given date from the current date and stores the
|
|
|
+ //! result.
|
|
|
+ //! \param jahr The year to subtract. \param monat The month to
|
|
|
+ //! subtract.
|
|
|
//! \param tag The day to subtract.
|
|
|
//! Example: ( 2.12.1996 ).minusDate( 1, 1, 1 ); new date: 1.11.1995
|
|
|
DLLEXPORT void minusDate(int jahr, int monat, int tag);
|
|
|
- //! Subtracts the given date from the current date and stores the result.
|
|
|
+ //! Subtracts the given date from the current date and stores the
|
|
|
+ //! result.
|
|
|
//! \param format A string specifying the format of the
|
|
|
//! date in (datum). y=year, m=month, d=day.
|
|
|
//! \param datum A string containing the date to subtract.
|
|
|
//! Example: ( 2.12.1996 ).minusDate( "d.m.y", "1.1.1" );
|
|
|
//! new date: 1.11.1995
|
|
|
DLLEXPORT void minusDate(const char* format, const char* datum);
|
|
|
- //! Subtracts the given date from the current date and stores the result.
|
|
|
+ //! Subtracts the given date from the current date and stores the
|
|
|
+ //! result.
|
|
|
//! \param format A string specifying the format of the
|
|
|
//! date in (datum). y=year, m=month, d=day.
|
|
|
//! \param datum A Text object containing the date to subtract.
|
|
|
//! Example: ( 2.12.1996 ).minusDate( "d.m.y", new Text(
|
|
|
//! "1.1.1" ) ); new date: 1.11.1995
|
|
|
DLLEXPORT void minusDate(const char* format, Text* datum);
|
|
|
- //! Subtracts the given year from the current date and stores the result.
|
|
|
+ //! Subtracts the given year from the current date and stores the
|
|
|
+ //! result.
|
|
|
//! \param jahr The year to subtract.
|
|
|
//! Example: ( 1.11.1996 ).minusYear( 1 ); new date: 1.11.1995
|
|
|
DLLEXPORT void minusYear(int jahr);
|
|
|
- //! Subtracts the given month from the current date and stores the result.
|
|
|
+ //! Subtracts the given month from the current date and stores the
|
|
|
+ //! result.
|
|
|
//! \param monat The month to subtract.
|
|
|
//! Example: ( 1.12.1996 ).minusMonth( 13 ); new date: 1.11.1995
|
|
|
DLLEXPORT void minusMonth(int monat);
|
|
|
@@ -425,7 +430,8 @@ namespace Framework
|
|
|
//! A Text object containing the date to check.
|
|
|
//! \return (true) if the given date matches the stored one.
|
|
|
//! (false) otherwise.
|
|
|
- //! Example: ( 1.11.1995 ).isEqual( "y-m-d", new Text( "1995-11-1" ) ); return: true
|
|
|
+ //! Example: ( 1.11.1995 ).isEqual( "y-m-d", new Text( "1995-11-1" ) );
|
|
|
+ //! return: true
|
|
|
DLLEXPORT bool isEqual(const char* format, Text* datum) const;
|
|
|
//! Checks if the date equals the given date.
|
|
|
//! \param jahr The year of the date to check.
|
|
|
@@ -470,7 +476,8 @@ namespace Framework
|
|
|
//! A string containing the date to check. \return
|
|
|
//! (true) if the stored date is before the given one.
|
|
|
//! (false) otherwise.
|
|
|
- //! Example: ( 1.11.1995 ).isSmaller( "y, m, d", "2016, 1, 23" ); return true
|
|
|
+ //! Example: ( 1.11.1995 ).isSmaller( "y, m, d", "2016, 1, 23" ); return
|
|
|
+ //! true
|
|
|
DLLEXPORT bool isSmaller(const char* format, const char* datum) const;
|
|
|
//! Checks if the stored date is less than the given one.
|
|
|
//! \param format A string specifying the format of the
|
|
|
@@ -478,7 +485,8 @@ namespace Framework
|
|
|
//! A Text object containing the date to check.
|
|
|
//! \return (true) if the stored date is before the given one.
|
|
|
//! (false) otherwise.
|
|
|
- //! Example: ( 1.11.1995 ).isSmaller( "y, m, d", new Text( "2016, 1, 23" ) ); return true
|
|
|
+ //! Example: ( 1.11.1995 ).isSmaller( "y, m, d", new Text( "2016, 1, 23"
|
|
|
+ //! ) ); return true
|
|
|
DLLEXPORT bool isSmaller(const char* format, Text* datum) const;
|
|
|
//! Checks if the stored date is greater than the given one.
|
|
|
//! \param datum The date to check.
|
|
|
@@ -500,7 +508,8 @@ namespace Framework
|
|
|
//! A string containing the date to check. \return
|
|
|
//! (true) if the stored date is after the given one.
|
|
|
//! (false) otherwise.
|
|
|
- //! Example: ( 1.11.1995 ).isLater( "y, m, d", "2016, 1, 23" ); return false
|
|
|
+ //! Example: ( 1.11.1995 ).isLater( "y, m, d", "2016, 1, 23" ); return
|
|
|
+ //! false
|
|
|
DLLEXPORT bool isLater(const char* format, const char* datum) const;
|
|
|
//! Checks if the stored date is greater than the given one.
|
|
|
//! \param format A string specifying the format of the
|
|
|
@@ -508,7 +517,8 @@ namespace Framework
|
|
|
//! A Text object containing the date to check.
|
|
|
//! \return (true) if the stored date is after the given one.
|
|
|
//! (false) otherwise.
|
|
|
- //! Example: ( 1.11.1995 ).isLater( "y, m, d", new Text( "2016, 1, 23" ) ); return true
|
|
|
+ //! Example: ( 1.11.1995 ).isLater( "y, m, d", new Text( "2016, 1, 23" )
|
|
|
+ //! ); return true
|
|
|
DLLEXPORT bool isLater(const char* format, Text* datum) const;
|
|
|
};
|
|
|
|
|
|
@@ -691,13 +701,17 @@ namespace Framework
|
|
|
int stunde,
|
|
|
int minute,
|
|
|
int sekunde) const;
|
|
|
- //! Returns the object storing the date with increased reference counter.
|
|
|
+ //! Returns the object storing the date with increased reference
|
|
|
+ //! counter.
|
|
|
DLLEXPORT Date* getDate() const;
|
|
|
- //! Returns the object storing the date without increased reference counter.
|
|
|
+ //! Returns the object storing the date without increased reference
|
|
|
+ //! counter.
|
|
|
DLLEXPORT Date* zDate() const;
|
|
|
- //! Returns the object storing the time of day with increased reference counter.
|
|
|
+ //! Returns the object storing the time of day with increased reference
|
|
|
+ //! counter.
|
|
|
DLLEXPORT Clock* getClock() const;
|
|
|
- //! Returns the object storing the time of day without increased reference counter.
|
|
|
+ //! Returns the object storing the time of day without increased
|
|
|
+ //! reference counter.
|
|
|
DLLEXPORT Clock* zClock() const;
|
|
|
//! Checks if the stored time is less than the given time.
|
|
|
//! \param zeit The time to check. \return (true)
|