Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #2

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# auxo
![author](https://img.shields.io/badge/author-chariesgavin-blueviolet.svg)[![Go](https://github.com/guobinhit/auxo/actions/workflows/go.yml/badge.svg)](https://github.com/guobinhit/auxo/actions/workflows/go.yml)![issues](https://img.shields.io/github/issues/guobinhit/auxo.svg)![stars](https://img.shields.io/github/stars/guobinhit/auxo.svg)![forks](https://img.shields.io/github/forks/guobinhit/auxo.svg)![license](https://img.shields.io/github/license/guobinhit/auxo.svg)
![author](https://img.shields.io/badge/author-chariesgavin-blueviolet.svg)[![Go](https://github.com/guobinhit/timekit/actions/workflows/go.yml/badge.svg)](https://github.com/guobinhit/timekit/actions/workflows/go.yml)![issues](https://img.shields.io/github/issues/guobinhit/timekit.svg)![stars](https://img.shields.io/github/stars/guobinhit/auxo.svg)![forks](https://img.shields.io/github/forks/guobinhit/timekit.svg)![license](https://img.shields.io/github/license/guobinhit/timekit.svg)

> Auxo, goddess of summer and growth.

Expand All @@ -16,32 +16,32 @@ You can also ask for problem-solving ideas and discuss in GitHub issues directly
Firstly, download this pkg,

```go
go get github.com/guobinhit/auxo
go get github.com/guobinhit/timekit
```

Secondly, use it.

```go
import (
"github.com/guobinhit/auxo"
"github.com/guobinhit/timekit"
)

// Get a specified time by add days, such as d is 2022-04-13 10:20:30 and days is 10,
// then aDate is 2022-04-23 10:20:30
aDate := auxo.GetTimeAddDays(time.Now(), 10)
aDate := timekit.GetTimeAddDays(time.Now(), 10)

// Get a specified date format time string of common version, such as d is 2022-04-13 10:20:30,
// then aString is "2022-04-23 10:20:30"
aString := auxo.FormatYyyyMmDdHhMmSs(time.Now())
aString := timekit.FormatYyyyMmDdHhMmSs(time.Now())

// Get a specified date format time string of china version, such as d is 2022-04-13 10:20:30,
// then aString2 is "2022年04月23日 10:20:30", like FormatCnOfYyyyMmDdHhMmSs method,
// FormatEnOfYyyyMmDdHhMmSs return "2022/04/23 10:20:30" and FormatCptOfYyyyMmDdHhMmSs return "20220423102030".
aString2 := auxo.FormatCnOfYyyyMmDdHhMmSs(time.Now())
aString2 := timekit.FormatCnOfYyyyMmDdHhMmSs(time.Now())

// Get a specified date format time, such as dStr is "2022-04-13 10:20:30",
// then aTime is 2022-04-23 10:20:30
aTime, err := auxo.ParseYyyyMmDdHhMmSs("2022-04-13 10:20:30")
aTime, err := timekit.ParseYyyyMmDdHhMmSs("2022-04-13 10:20:30")
```

Finally, good luck guys!