guess_time_format: Guesses the strptime format of a time string

Description Usage Arguments Examples

Description

Guesses the strptime format of a time string

Usage

1

Arguments

string

a string

Examples

1
2
3
4
5
guess_time_format("12:00 AM")    #=> "%I:%M %p"
guess_time_format("23:59:23")    #=> "%H:%M:%S"
guess_time_format("23:59")       #=> "%H:%M"
guess_time_format("23:59:59")    #=> "%H:%M:%S"
guess_time_format("2:24 AM")     #=> "%l:%M %p"

ramnathv/intellidate documentation built on May 26, 2019, 10:14 p.m.