1k-date-formatting

Standardize date and time formatting across OneKey apps using shared dateUtils methods.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/wanghaisheng/web3-scaffold-app-monorepo --skill 1k-date-formatting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 1k-date-formatting
Source: https://github.com/wanghaisheng/web3-scaffold-app-monorepo/tree/main/.claude/skills/1k-date-formatting
Command: npx skills add https://github.com/wanghaisheng/web3-scaffold-app-monorepo --skill 1k-date-formatting

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Date formatting in OneKey apps is inconsistent when native JavaScript date methods are used; this skill standardizes on OneKey dateUtils to ensure uniform presentation across platforms.

Core Features & Use Cases

  • Unified, locale-aware formatting using formatDate/formatTime from @onekeyhq/shared
  • Support for relative dates and custom formats via formatRelativeDate and formatDateFns
  • Use case: display transaction timestamps, logs, and reports consistently across web and mobile.

Quick Start

Replace native date usage with OneKey's date utilities in a sample component to achieve consistent, locale-aware display.

Frequently Asked Questions about 1k-date-formatting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize date formatting in a React app for consistent UI rendering?

To standardize date formatting in a React app, replace native JavaScript Date methods with shared dateUtils like formatDate and formatTime to ensure uniform, locale-aware presentation across web and mobile platforms.

What is the best way to display relative dates and transaction timestamps consistently across platforms?

Displaying relative dates and transaction timestamps consistently requires using formatRelativeDate and formatDistanceToNow from shared date utilities, ensuring uniform presentation across both web and mobile environments.

Why does using native JavaScript Date methods cause inconsistent locale-aware formats in OneKey apps?

Using native JavaScript Date methods causes inconsistent locale-aware formats because they lack unified formatting rules, whereas shared dateUtils enforce standardized date and time presentation across all OneKey apps.

Can I use custom formats for logs and reports without relying on native Date methods?

Yes, you can apply custom formats for logs and reports using formatDateFns from the shared date utilities, avoiding native Date methods to maintain consistent presentation across platforms.

Does the OneKey date formatting skill work for both web and mobile environments?

Yes, the OneKey date formatting skill works for both web and mobile environments by enforcing shared dateUtils methods to standardize full timestamps, relative times, and locale-aware formats.