Search packages, repositories and app categories

GitHub repositorytejainece/date_format

date_format

Format Dates

date_format project cover
Stars
87
Forks
75
Last push (UTC)
Jan 16, 2025
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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

Ravi Teja Gudapati GitHub avatar
GitHub author

Ravi Teja Gudapati ↗

Programming. Innovation. Football. Exercising.

LanguagesDart

Packages published by this repository

Dependencies used

Dependency list 1 items

  • testDevelopment^1.3.0

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗