This function is used in Python Scripting.

Description

Compares a target date with two other dates; checks to see if the target date is between the other two dates.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.date.isBetween(target_date, start_date, end_date)

  • Parameters

Date target_date - The date to compare.

Date start_date - The start of a date range.

Date end_date - The end of a date range. This date must be after the start date.

  • Returns

Boolean - True if target_date is >= start_date and target_date <= end_date, false otherwise.

  • Scope

Gateway, Vision Client, Perspective Session

Code Examples
Code Snippet
# This compares if the first date is between the other dates, which it is not.
# Note that if the end date is before the start date, this function will always return false.
 
target = system.date.getDate(2017, 4, 28)
start = system.date.getDate(2017, 3, 22)
end = system.date.getDate(2017, 4, 22)
print system.date.isBetween(target, start, end) #Will print false.
Keywords

system date isBetween, date.isBetween