From d4af6594fcb43fa0434f53559ddbcdebe75222e3 Mon Sep 17 00:00:00 2001 From: Santiago De la Cruz Date: Sat, 8 Aug 2020 01:11:44 -0400 Subject: [PATCH] Update readme --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4025cbd..5010f77 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ This package allows to get a time.Duration from a string. The string can be a string retorned for time.Duration or a similar string with weeks or days too!. -[![Go Doc](https://godoc.org/github.com/xhit/go-str2duration?status.svg)](https://godoc.org/github.com/xhit/go-str2duration) -[![Go Report](https://goreportcard.com/badge/github.com/xhit/go-str2duration)](https://goreportcard.com/report/github.com/xhit/go-str2duration) +Go Report Card +go.dev ## Download @@ -17,10 +17,14 @@ Go String To Duration supports this strings conversions to duration: - All strings returned in time.Duration String. - A string more readable like 1w2d6h3ns (1 week 2 days 6 hours and 3 nanoseconds) +**Note**: a day is 24 hour. + +If you don't need days and weeks, use [`time.ParseDuration`](https://golang.org/pkg/time/#ParseDuration). + ## Use cases - Imagine you save the output of time.Duration strings in a database, file, etc... and you need to convert again to time.Duration. Now you can! -- Set a more precise duration in a configuration file for wait, timeouts, measure, etc... +- Set a more precise duration in a configuration file for wait, timeouts, measure, etc... ## Usage