DateTime.IsInPreviousNMinutesDateTime.IsInPreviousNMinutes
構文Syntax
DateTime.IsInPreviousNMinutes(dateTime as any, minutes as number) as nullable logical
バージョン情報About
システム上の現在の日時によって決定される、前の分数に、指定された datetime 値 dateTime
が発生するかどうかを示します。Indicates whether the given datetime value dateTime
occurs during the previous number of minutes, as determined by the current date and time on the system. この関数は、現在の分に含まれる値が渡された場合は false を返すことに注意してください。Note that this function will return false when passed a value that occurs within the current minute.
dateTime
: 評価されるdatetime
またはdatetimezone
値。dateTime
: Adatetime
, ordatetimezone
value to be evaluated.minutes
: 分数。minutes
: The number of minutes.
例 1Example 1
システムの現在の時刻の前の分が、前の 2 分間に含まれるかどうかを調べます。Determine if the minute before the current system time is in the previous two minutes.
DateTime.IsInPreviousNMinutes(DateTime.FixedLocalNow() - #duration(0, 0, 2, 0), 2)
true