tidyverse / hms

A simple class for storing time-of-day values
https://hms.tidyverse.org/
Other
138 stars 25 forks source link

#39 #45

Closed qgeissmann closed 3 years ago

qgeissmann commented 7 years ago

My attempt at rewriting the parser (issue #39).

So now, this should work:

time_str <- c("12:34:56",         # regular format
              "12:34:56.789",     # decimal points
              "20:12",            # HH:MM (no seconds)
              "-12:34:56.001",    # negative values without days
              "1d 12:34:56",      # number of days (integer)
              "1d 12:34:56.001",  # decimal points and days
              "-1d 12:34:56.001", # negative values
              "-1d 12:34:56.001", # negative values and space
              "0.5d",             # day only
              NA                  # NA
)

In addition,

codecov[bot] commented 7 years ago

Codecov Report

Merging #45 into master will decrease coverage by 2.45%. The diff coverage is 94.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
- Coverage   98.63%   96.17%   -2.46%     
==========================================
  Files           6        6              
  Lines          73      157      +84     
==========================================
+ Hits           72      151      +79     
- Misses          1        6       +5
Impacted Files Coverage Δ
R/hms.R 97.36% <100%> (+0.07%) :arrow_up:
R/parse.R 94.11% <94.11%> (-5.89%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8f4eaa3...03b0948. Read the comment docs.

krlmlr commented 3 years ago

Thanks for working on this. Let's leave better parsing to other packages.