Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tpkn/dates-range
Go module to get a list of dates between two dates
https://github.com/tpkn/dates-range
Last synced: 6 days ago
JSON representation
Go module to get a list of dates between two dates
- Host: GitHub
- URL: https://github.com/tpkn/dates-range
- Owner: tpkn
- License: mit
- Created: 2020-11-15T20:03:10.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-03T21:26:42.000Z (almost 4 years ago)
- Last Synced: 2024-11-14T14:32:25.071Z (2 months ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dates Range
Go module to get a list of dates between two dates## API
```go
datesrange.New(start_date, end_date)
```### start_date
**Type**: `string`
Start date (e.g. `2020-01-01`)### end_date
**Type**: `string`
End date (e.g. `2020-03-07`). Can be empty if you need a range up to today.### @return
**Type**: `[]time.Time, error`## Usage
```go
list, err := datesrange.New("2020-06-26", "2020-09-26")
if err != nil {
fmt.Println("Error:", err)
}for _, d := range list {
fmt.Println(d)
}
```