Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jehiah/go-strftime
go implementation of strftime
https://github.com/jehiah/go-strftime
Last synced: 5 days ago
JSON representation
go implementation of strftime
- Host: GitHub
- URL: https://github.com/jehiah/go-strftime
- Owner: jehiah
- License: mit
- Created: 2012-06-21T02:35:24.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2017-12-01T14:10:54.000Z (almost 7 years ago)
- Last Synced: 2024-10-14T13:59:04.463Z (23 days ago)
- Language: Go
- Size: 7.81 KB
- Stars: 135
- Watchers: 6
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
go-strftime
===========go implementation of strftime
## Example
```
package mainimport (
"fmt"
"time"strftime "github.com/jehiah/go-strftime"
)func main() {
t := time.Unix(1340244776, 0)
utc, _ := time.LoadLocation("UTC")
t = t.In(utc)
fmt.Println(strftime.Format("%Y-%m-%d %H:%M:%S", t))
// Output:
// 2012-06-21 02:12:56
}
```