Zeba Academy Date Tools ๐Ÿ“…

A powerful and lightweight Flutter package for handling date and time operations easily.

Zeba Academy Date Tools provides reusable widgets and helpers including calendar UI, date picker utilities, duration formatting, and relative time formatting.

Built for modern Flutter applications with Material 3 support, null safety, and a clean developer-friendly API.


โœจ Features

โœ… Calendar widget
โœ… Date picker helper
โœ… Time picker helper
โœ… Duration formatter
โœ… Relative time formatter
โœ… Date range model
โœ… Material 3 compatible
โœ… Null safety
โœ… Lightweight and easy to integrate


๐Ÿ“ฆ Installation

Add this to your pubspec.yaml:

dependencies:
  zeba_academy_date_tools: ^1.0.0

Then run:

flutter pub get

๐Ÿš€ Usage

Import the package:

import 'package:zeba_academy_date_tools/zeba_academy_date_tools.dart';

๐Ÿ“… Calendar Widget

Display a calendar easily:

ZebaCalendar(
  selectedDate: DateTime.now(),

  onChanged: (date){

    print(date);

  },
)

๐Ÿ—“ Date Picker

Open a date picker:

final date =
await ZebaDatePicker.pickDate(
  context,
);

print(date);

โฐ Time Picker

Select time:

final time =
await ZebaDatePicker.pickTime(
  context,
);

print(time);

โŒ› Duration Formatter

Convert duration into readable format:

final result =
ZebaDurationFormatter.format(
  Duration(
    hours: 2,
    minutes: 30,
  ),
);

print(result);

Output:

2h 30m

๐Ÿ•’ Relative Time

Show human readable time:

final text =
ZebaRelativeTime.format(
  DateTime.now()
    .subtract(
      Duration(hours: 2),
    ),
);

print(text);

Output:

2 hours ago

๐Ÿ“† Date Range

Create a date range:

final range =
ZebaDateRange(
  start: DateTime(2026,1,1),
  end: DateTime(2026,1,10),
);


print(
 range.duration.inDays
);

Output:

9

๐Ÿงช Testing

Run package tests:

flutter test

Analyze code:

flutter analyze

๐Ÿ“‚ Project Structure

lib/
 โ”œโ”€โ”€ zeba_academy_date_tools.dart
 โ”‚
 โ””โ”€โ”€ src/
     โ”œโ”€โ”€ widgets/
     โ”‚    โ””โ”€โ”€ calendar_view.dart
     โ”‚
     โ”œโ”€โ”€ picker/
     โ”‚    โ””โ”€โ”€ date_picker_helper.dart
     โ”‚
     โ”œโ”€โ”€ formatters/
     โ”‚    โ”œโ”€โ”€ duration_formatter.dart
     โ”‚    โ””โ”€โ”€ relative_time.dart
     โ”‚
     โ””โ”€โ”€ models/
          โ””โ”€โ”€ date_range.dart

๐Ÿ‘จโ€๐Ÿ’ป About Me

โœจ Iโ€™m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.

Learn more about my work:

๐ŸŒ sufyanism.com
๐Ÿ’ผ LinkedIn


๐ŸŽ“ Zeba Academy

Your all-in-one learning hub!

๐Ÿš€ Explore courses and resources in coding, tech, and development.

Build practical skills through tutorials, real-world projects, and hands-on learning.

๐Ÿ’ป Level up your development journey today!

Zeba Academy is a learning platform dedicated to:

  • Coding
  • Technology
  • Software Development

Visit:

โžก Main website:
https://zeba.academy

โžก Courses and resources:
https://code.zeba.academy

โžก YouTube tutorials:
https://www.youtube.com/@zeba.academy

โžก Instagram:
https://www.instagram.com/zeba.academy/


๐Ÿค Contributing

Contributions are welcome!

Steps:

  1. Fork the repository

  2. Create your feature branch

git checkout -b feature/new-feature
  1. Commit changes
git commit -m "Add new feature"
  1. Push branch
git push origin feature/new-feature
  1. Create a Pull Request

๐Ÿ“œ License

This project is licensed under the GNU General Public License v3.0.

You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license.

See the full license:

https://www.gnu.org/licenses/gpl-3.0.html


โค๏ธ Support

If this package helps your project, consider giving it a โญ on GitHub.

Thank you for using Zeba Academy Date Tools ๐Ÿš€