Crates.io | strftime-ruby |
lib.rs | strftime-ruby |
version | |
source | src |
created_at | 2022-08-20 16:25:26.674813 |
updated_at | 2024-12-08 21:51:59.085604 |
description | Ruby `Time#strftime` parser and formatter |
homepage | https://github.com/artichoke/strftime-ruby |
repository | https://github.com/artichoke/strftime-ruby |
max_upload_size | |
id | 649396 |
Cargo.toml error: | TOML parse error at line 28, column 1 | 28 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
strftime-ruby
is a Ruby 3.1.2 compatible implementation of the
Time#strftime
method. The strftime
routines provided by this crate are
POSIX-compatible, except for intentionally ignoring the E
and O
modified
conversion specifiers.
Formats time according to the directives in the given format string.
The directives begin with a percent (%) character. Any text not listed as a directive will be passed through to the output string.
The directive consists of a percent (%) character, zero or more flags, optional minimum field width, optional modifier and a conversion specifier as follows:
%<flags><width><modifier><conversion>
Add this to your Cargo.toml
:
[dependencies]
strftime-ruby = "1.1.0"
All features are enabled by default.
std::error::Error
on the error types in
this crate and the strftime::io
module, which depends on std::io::Write
.
Activating this feature also activates the alloc feature.alloc
crate. Activating this
feature enables the strftime::bytes
and stftime::string
modules, which
depend on alloc::vec::Vec
and alloc::string::String
. When the
alloc feature is enabled, this crate only uses fallible allocation APIs.This crate requires at least Rust 1.76.0. This version can be bumped in minor releases.
strftime-ruby
is licensed under the MIT License (c) Ryan Lopopolo
and x-hgg-x.
This repository includes a vendored copy of strftime.c
from Ruby 3.1.2,
which is licensed under the Ruby license or BSD 2-clause license. See
vendor/README.md
for more details. These sources are not distributed on
crates.io.