Learn R Programming

Friendly Time Formats

Have you ever had to build a way too complicated time format?

my_time_format = "%Ey/%b/%0d%t%0I:%0M:%0S3 %p %Z"

No human could read this. striptimer allows you to build understandable time formats.

time_format(year %>% short %>% religious,
            "/",
            month %>% name %>% short,
            "/",
            day %>% roman,
            
            tab,
            
            hour %>% twelve %>% roman,
            ":",
            minute %>% roman,
            ":",
            second %>% digits(3),
            " ",
            am_pm,
            " ",
            timezone %>% name)

Inspired by kevinushey/rex

Installation

library(devtools)
install_github("bramtayl/strptimer")

Copy Link

Version

Install

install.packages('strptimer')

Monthly Downloads

1

Version

0.1.0

License

MIT + file LICENSE

Maintainer

Brandon Taylor

Last Published

December 13th, 2015

Functions in strptimer (0.1.0)

time_format_

Standard evaluation version of time_format
base_options

Get a list of optional modifications to a unit of time
time_bases

Get a list of base units of time for building time formats
time_format

Build a time format expression