qtDateTime
|
Public Member Functions | |
integer(qtdt_k_int4) function | qtdt_f_datedifference (tDate2, tDate1) |
qtDT_F_DateDifferenceReturns the difference of two dates in days More... | |
type(qtdt_t_date) function | qtdt_f_datesubdays (tDateS, nDays) |
qtDT_F_DateSubDaysReturns a date that is the result of substracting days from a given date More... | |
type(qtdt_t_time) function | qtdt_f_timedifference (tTime2, tTime1) |
qtDT_F_TimeDifferenceReturns the difference of two time values More... | |
integer(qtdt_k_int4) function qtdt_f_datedifference | ( | type (qtdt_t_date), intent(in) | tDate2, |
type (qtdt_t_date), intent(in) | tDate1 | ||
) |
Usage:
nDays = tDate2 - tDate1 nDays = qtDT_F_DateDifference( tDate2, tDate1 )
tDate2 | : date to subtract tDate1 from |
tDate1 | : date to be substracted |
Substracts one date from another and returns the difference as the number of days. If the date given in the first argument is older than the second one, then a negative value is returned.
If an invalid date is specified, the function returns the value of -HUGE(nDays) .
The function is used to overload the operator - .
type (qtdt_t_date) function qtdt_f_datesubdays | ( | type (qtdt_t_date), intent(in) | tDateS, |
integer(qtdt_k_int4), intent(in) | nDays | ||
) |
Usage:
tDateE = tDateS - nDays tDateE = qtDT_F_DateSubDays( tDateS, nDays )
tDateS | : date |
nDays | : number of days substracted from tDateS |
Returns the date that is the result of a given date to which is added a number of days. If the number of days given is negative than these days are substracted from the given date.
If an invalid date is specified, the function returns the value of qtDT_T_Date(-1,-1,-1) .
The function is used to overload the operators + and - .
type (qtdt_t_time) function qtdt_f_timedifference | ( | type (qtdt_t_time), intent(in) | tTime2, |
type (qtdt_t_time), intent(in) | tTime1 | ||
) |
Usage:
tTimeDiff = tTime2 - tTime1 tTimeDiff = qtDT_F_TimeDifference( tTime2, tTime1 )
tTime2 | : time to subtract tTime1 from |
tTime1 | : time to be substracted |
Substracts one time from another and returns the absolute value of the difference. Thus, even if the time given in the first argument is less than the second one, positive values are returned in all components of the type.
The function is used to overload the operator - .