FLUTTER ECOSYSTEM

tejainece/date_format

格式化日期

日期格式 项目封面
Stars
87
Forks
75
最近推送(UTC)
2025年1月16日
项目状态
未归档
Ravi Teja Gudapati GitHub avatar
GITHUB User

Ravi Teja Gudapati ↗

Programming. Innovation. Football. Exercising.

ABBStockholm官方网站 ↗
语言Dart

此仓库发布的插件

使用的依赖

依赖清单 1 项
  • test开发依赖^1.3.0

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

date_format

A simple API to format dates.

Usage

Use formatDate function to format a DateTime object.

print(formatDate(DateTime(1989, 02, 21), [yyyy, '-', mm, '-', dd]));

Output:

1989-02-21

Long month names
print(formatDate(DateTime(1989, 2, 21), [yy, '-', M, '-', d]));

Output:

89-feb-21

Time parts
print(formatDate(
      DateTime(1989, 02, 1, 15, 40, 10), [HH, ':', nn, ':', ss]));

Output:

15:40:10

Timezone
print(formatDate(
      DateTime(1989, 02, 1, 15, 40, 10), [HH, ':', nn, ':', ss, z]));

Output:

15:40:10+0100