Skip to content

Commit

Permalink
Merge pull request #1639 from scallahanCybernet/patch-3
Browse files Browse the repository at this point in the history
Add member function to datecompare.json
  • Loading branch information
pfreitag authored Feb 29, 2024
2 parents 57d0b0e + ce79fb2 commit 042f54e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions data/en/datecompare.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name":"dateCompare",
"type":"function",
"syntax":"dateCompare(date1, date2 [, datePart])",
"member":"date1.compare(date2 [, datePart])",
"returns":"numeric",
"related":["compare","compareNoCase","dateDiff"],
"description":"Performs a full date/time comparison of two dates.\n `-1` if date1 is less than date2\n `0` if date1 is equal to date2\n `1` if date1 is greater than date2\n [DatePart] `yyyy`: Year; `m`: Month; `d`: Day; `h`: Hour; `n`: Minute; `s`: Second",
Expand Down Expand Up @@ -29,6 +30,12 @@
"description": "Returns 1 because date1 is greater than date 2",
"code": "dateCompare('12/30/2015', '12/02/2015', 'd')",
"result": "1"
},
{
"title": "Member function example",
"description": "",
"code": "d1 = createDate(\"2024\",\"01\",\"01\");\nd2 = createDate(\"2024\",\"02\",\"14\");\nd1.compare(d2)",
"result": "-1"
}
]
}

0 comments on commit 042f54e

Please sign in to comment.