times_format: Converts times

View source: R/input.R

times_formatR Documentation

Converts times

Description

Handles times like 8, 8 AM, 8 pm, 8:30 am, 8:30 PM and converts them all to the hour and minute, with the hour being a 24 hour clock. If you have a time like "2:00" it looks at the hour; if it's before assume_pm, it assumes you mean 2 pm, not 2 am

Usage

times_format(time, assume_pm = 7)

Arguments

time

The string of the time

assume_pm

The latest hour at which you assume the time means PM if not otherwise specified

Value

The hour:minute


bomeara/scheduleR documentation built on Jan. 21, 2025, 3:26 p.m.