DateTime.IsInPreviousSecond

语法

DateTime.IsInPreviousSecond(dateTime as any) as nullable logical

关于

指示给定的日期/时间值 dateTime 是否处于前一秒内(由系统上的当前日期和时间确定)。 注意,如果传递的值为当前这一秒的时间,此函数将返回 false。

  • dateTime:要计算的 datetimedatetimezone 值。

示例 1

确定当前系统时间前的一秒是否处于前一秒内。

使用情况

DateTime.IsInPreviousSecond(DateTime.FixedLocalNow() - #duration(0, 0, 0, 1))

输出

true

results matching ""

    No results matching ""