Skip to main content

CurateClick

github.com favicon

timediff

timediff 是一个 Rust 工具库,用于打印可阅读的相对时间段,支持 i18n。它是 Day.js 的 Rust 实现,弥补了 Rust 生态中类似工具的缺失。

Check out timediff on CurateClick

• Copy the embed code to showcase this product on your website

• Share on X to spread the word about this amazing tool

  • 项目地址:https://github.com/lryong/timediff- 语言:Rust- 项目描述:前端同学基本都知道 Moment.jsDay.js,其中 Day.js 是 Moment.js 替代工具,被广泛应用在前端项目中。 timediff 是 Day.js 支持 i18n 的一个 Rust 实现,用于打印不同语言的时间段表达,易于用户理解, 配合 humantime 基本可以完成 Day.js 的所有功能。 timediff 时间段的计算也遵循 Day.js 的规则,它很好地弥补了这个场景下的工具缺失。- 代码使用样例: rust use timediff::*; use timediff::TimeDiffError as Error; assert_eq!( TimeDiff::to_diff(String::from("-10s")) .locale(String::from("zh-CN")) .unwrap() .parse(), Ok(String::from("几秒前")) );

Latest Weekly Picks

Predict video virality before you publish.

Virality Predictor

Powerful Motion Control AI Video Generator

Motion Control AI

PlusGO 是面向中国大陆用户的 ChatGPT Plus 代充值服务平台。使用官方 CDKey,支持支付宝和微信扫码支付,平均 2 分钟完成 Plus 开通,自 2025 年起已为超过 10,000 名用户完成充值。

www.toolcenter.ai favicon
Weekly Pick

Discover the Best AI & Productivity Tools — 1,500+ tools with honest reviews.

ToolCenter
huntereyes.net favicon
Weekly Pick

AI Eye Area Evaluation

Hunter Eyes
www.payforchat.com favicon
Weekly Pick

Subscribe to ChatGPT Plus/Pro in 1 minute — no international credit card needed.

PayForChat
happyhorseai.ai favicon
Weekly Pick

Happy Horse AI Creates Videos with Motion and Storytelling

Happy Horse
promptbuilder.cc favicon
Weekly Pick

Generate, optimize, test, and manage AI prompts in one place. Turn an idea into a ready-to-use prompt in seconds.

Prompt Builder