Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/osteele/tuesday
Ruby-compatible strftime for golang
https://github.com/osteele/tuesday
golang golang-package strftime
Last synced: 24 days ago
JSON representation
Ruby-compatible strftime for golang
- Host: GitHub
- URL: https://github.com/osteele/tuesday
- Owner: osteele
- License: mit
- Created: 2017-08-10T20:46:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-19T03:38:18.000Z (almost 3 years ago)
- Last Synced: 2024-04-13T05:01:53.069Z (about 1 month ago)
- Topics: golang, golang-package, strftime
- Language: Go
- Homepage: https://godoc.org/github.com/osteele/tuesday
- Size: 25.4 KB
- Stars: 12
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Search and Analytic Databases)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Search and Analytic Databases)
- awesome-go-extra - tuesday - compatible strftime for golang|11|3|1|2017-08-10T20:46:26Z|2021-06-19T03:38:18Z| (Date and Time / Advanced Console UIs)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Search and Analytic Databases)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Search and Analytic Databases)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- awesome-go-projects - tuesday - Ruby-compatible Strftime function. (Date and Time / Standard CLI)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- awesome-go - tuesday - compatible Strftime function. | - | - | - | (Date and Time / Advanced Console UIs)
- awesome-go-with-framework - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- awesome-go-stars - tuesday(stars: 12) - Ruby-compatible Strftime function. (Date and Time / Search and Analytic Databases)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Search and Analytic Databases)
- awesome-go-cn - tuesday - compatible Strftime function。 [![godoc][D]](https://godoc.org/github.com/osteele/tuesday) (日期和时间 / 检索及分析资料库)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- awesome-go - tuesday - 兼容Ruby的Strftime函数。 (<span id="日期和时间-date-and-time">日期和时间 Date and Time</span> / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go. - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- awesome-go-with-stars - tuesday - Ruby-compatible Strftime function. (Date and Time / Search and Analytic Databases)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- repo-1316-awesome-go-cn - tuesday - compatible Strftime function。 [![godoc][D]](https://godoc.org/github.com/osteele/tuesday) (日期和时间 / 检索及分析资料库)
- repo-1211-awesome-go-cn - tuesday - compatible Strftime function。 [![godoc][D]](https://godoc.org/github.com/osteele/tuesday) (日期和时间 / 检索及分析资料库)
- awesome-Char - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- awesome-reader - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- Go-awesome - tuesday - Ruby-compatible Strftime function. (Date and Time / Search and Analytic Databases)
- awesome-go-cn - tuesday - compatible Strftime function。 [![godoc][D]](https://godoc.org/github.com/osteele/tuesday) (日期和时间 / 检索及分析资料库)
- awesome-go-handwritten - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- awesome-go2 - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Search and Analytic Databases)
- awesome-go - tuesday - Ruby-compatible Strftime function. - :arrow_down:1 - :star:5 (Date and Time / Advanced Console UIs)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Advanced Console UIs)
- awesome-go-cn - tuesday - compatible Strftime function。 ![最近一年没有更新][Yellow] (日期和时间 / 高级控制台用户界面)
- awesome-go-zh - tuesday - compatible Strftime function。 [![godoc][D]](https://godoc.org/github.com/osteele/tuesday) (日期和时间 / 检索及分析资料库)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Search and Analytic Databases)
- awesome-go - tuesday - Ruby-compatible Strftime function. (Date and Time / Search and Analytic Databases)
- awesome-go-cn - tuesday
- go-awesome-cn-star - tuesday
- awesome-go-cn - tuesday - compatible Strftime function.) (日期和时间 / Advanced Console UIs)
- awesome-go - tuesday - Ruby-compatible strftime for golang - ★ 6 (Date and Time)
README
# Tuesday: Ruby-Compatible Strftime for Go
[![Travis badge][travis-svg]][travis-url]
[![Golangci-lint badge][golangci-lint-svg]][golangci-lint-url]
[![Appveyor badge][appveyor-svg]][appveyor-url]
[![Coveralls badge][coveralls-svg]][coveralls-url]
[![Go Report Card badge][go-report-card-svg]][go-report-card-url]
[![Godoc badge][godoc-svg]][godoc-url]
[![MIT License][license-svg]][license-url]This package provides a function `Strftime` that is compatible with Ruby's [`Time.strftime`](https://ruby-doc.org/core-2.4.1/Time.html#method-i-strftime).
It provides additional flags and conversions beyond C stdlib-like `strftime`s:
* padding flags, *e.g.* `%-m`, `%_m`, `%0e`
* case change flags, *e.g.* `%^A`, `%#b`
* field widths: `%03e`, `%3N`, `%9N`
* Ruby-specific conversions such as `%s`, `%N`, `%:z`, `%::z`It was developed for use with in [Liquid](https://github.com/osteele/liquid) and [Gojekyll](https://github.com/osteele/gojekyll).
## Install
`go get gopkg.in/osteele/tuesday.v1` # latest snapshot
`go get -u github.com/osteele/tuesday` # development version
## References
* [Ruby Date.strftime](https://ruby-doc.org/stdlib-2.4.1/libdoc/date/rdoc/Date.html#method-i-strftime)
* [Ruby DateTime.strftime](https://ruby-doc.org/stdlib-2.4.1/libdoc/date/rdoc/DateTime.html#method-i-strftime)
* [Ruby Time.strftime](https://ruby-doc.org/core-2.4.1/Time.html#method-i-strftime)## License
MIT License
[coveralls-url]: https://coveralls.io/r/osteele/tuesday?branch=master
[coveralls-svg]: https://img.shields.io/coveralls/osteele/tuesday.svg?branch=master[godoc-url]: https://godoc.org/github.com/osteele/tuesday
[godoc-svg]: https://godoc.org/github.com/osteele/tuesday?status.svg[golangci-lint-url]: https://github.com/osteele/tuesday/actions?query=workflow%3Agolangci-lint
[golangci-lint-svg]: https://github.com/osteele/tuesday/actions/workflows/golangci-lint.yml/badge.svg[license-url]: https://github.com/osteele/tuesday/blob/master/LICENSE
[license-svg]: https://img.shields.io/badge/license-MIT-blue.svg[go-report-card-url]: https://goreportcard.com/report/github.com/osteele/tuesday
[go-report-card-svg]: https://goreportcard.com/badge/github.com/osteele/tuesday[travis-url]: https://travis-ci.com/osteele/tuesday
[travis-svg]: https://img.shields.io/travis/osteele/tuesday.svg?branch=master[appveyor-url]: https://ci.appveyor.com/project/osteele/tuesday
[appveyor-svg]: https://ci.appveyor.com/api/projects/status/y9cyh4e30yjxshtm?svg=true