Skip to content

Commit d4af659

Browse files
committed
Update readme
1 parent 4ad2a74 commit d4af659

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
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!.
44

5-
[![Go Doc](https://godoc.org/github.com/xhit/go-str2duration?status.svg)](https://godoc.org/github.com/xhit/go-str2duration)
6-
[![Go Report](https://goreportcard.com/badge/github.com/xhit/go-str2duration)](https://goreportcard.com/report/github.com/xhit/go-str2duration)
5+
<a href="https://goreportcard.com/report/github.com/xhit/go-str2duration"><img src="https://goreportcard.com/badge/github.com/xhit/go-str2duration" alt="Go Report Card"></a>
6+
<a href="https://pkg.go.dev/github.com/xhit/go-str2duration?tab=doc"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white" alt="go.dev"></a>
77

88
## Download
99

@@ -17,10 +17,14 @@ Go String To Duration supports this strings conversions to duration:
1717
- All strings returned in time.Duration String.
1818
- A string more readable like 1w2d6h3ns (1 week 2 days 6 hours and 3 nanoseconds)
1919

20+
**Note**: a day is 24 hour.
21+
22+
If you don't need days and weeks, use [`time.ParseDuration`](https://golang.org/pkg/time/#ParseDuration).
23+
2024
## Use cases
2125

2226
- 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!
23-
- Set a more precise duration in a configuration file for wait, timeouts, measure, etc...
27+
- Set a more precise duration in a configuration file for wait, timeouts, measure, etc...
2428

2529
## Usage
2630

0 commit comments

Comments
 (0)