date_centre: Function to calculate the centre point of two dates.

View source: R/date_centre.R

date_centreR Documentation

Function to calculate the centre point of two dates.

Description

Function to calculate the centre point of two dates.

Usage

date_centre(date_start, date_end)

Arguments

date_start

Start date.

date_end

End date.

Value

POSIXct vector with a length of one.

Author(s)

Stuart K. Grange.

Examples


# Define some dates
date_one <- lubridate::ymd_h("2019-02-03 5", tz = "UTC")
date_two <- lubridate::ymd_hms("2019-04-12 6:54:55.98565", tz = "UTC")

# Calculate centre point
date_centre(date_one, date_two)


skgrange/threadr documentation built on April 15, 2024, 9:35 p.m.