BetweenTime: Does the time fall in specified range?

Description Usage Arguments Value Examples

Description

This is a compare function of time. It extracts the hours, minutes and seconds to check if it falls in specified time range.

Usage

1
BetweenTime(x, interval)

Arguments

x

A POSIXt class vector.

interval

A character vector of boundary values, each element should be in format "hh:mm".

Value

TRUE or FALSE.

Examples

1
2
3
x <- lubridate::ymd_hms("2019-01-02 07:30:00")
flightscanner:::BetweenTime(x, c("7:30", "8:00"))
flightscanner:::BetweenTime(x, c("6:00", "7:29"))

MinZhang95/flightscanner documentation built on July 1, 2019, 9:36 p.m.