DateTime():isAfter()
يتحقق ما إذا كان كائن DateTime الحالي بعد كائن DateTime آخر.
التوقيع
isAfter(other: DateTime): boolean
المعاملات
| المعامل | النوع | الوصف |
|---|---|---|
other | DateTime | كائن DateTime الآخر للمقارنة به. |
القيمة المعادة
- النوع:
boolean trueإذا كانDateTimeالحالي يأتي بعدotherبشكل صارم، وfalseبخلاف ذلك.
أمثلة
local date1 = DateTime(2024, 1, 10)
local date2 = DateTime(2024, 1, 5)
local result1 = date1:isAfter(date2) -- result will be true
toast(tostring(result1))
local result2 = date2:isAfter(date1) -- result will be false
toast(tostring(result2))