DateTime compare

From Catglobe Wiki
Revision as of 09:47, 7 March 2011 by 127.0.0.1 (talk | contribs) (jrfconvert import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



DateTime_compare

Compare 2 datetimes

Syntax

DateTime_compare(date1, date1);

Arguments

  • date1, date2 are arrays which are datetimes to be compared

Return value

number in which:

  • - 1: DateTime_Comparison_Less
  • 0 : DateTime_Comparison_Equal
  • 1: DateTime_Comparison_Greater

Example

array a1 = DateTime_getByYMD(1985,12,24);

array a2 = getCurrentDateTime();

bool result = DateTime_compare(a1, a2);

Availability

Version 5.7