eztime

Last updated:

0 purchases

eztime Image
eztime Images
Add to Cart

Description:

eztime

Easy to use, tiny Time library for when you just need time without all that DateTime nonsense.
Features #

Conversion to and from Strings
Conversion to and from milliseconds as ints
Addition and subtraction

Getting started #
To get started, simply import the library with import 'package:eztime/eztime.dart'
and create a Time object
var t = Time.fromString("12:00:00");
// or
var t = Time.fromMilliseconds(43200000); // 12 hours
// or
var t = Time(12, 00, 00)
copied to clipboard
Usage #
Addition and subtraction
Time(12) + Time(0, 30); // 12:30:00
Time(10) - Time(5); // 05:00:00
Time(10, 0, 0, true) + Time(5); // -10:00:00 + 05:00:00 = -05:00:00
copied to clipboard
Conversion to and from more familiar formats
print(Time.fromString("00:30:00").toString()); // 00:30:00
print(Time(0, 1, 5).asMilliseconds); // 65000
copied to clipboard
Additional information #
Source code found at https://github.com/jaq-the-cat/eztime. Contribute at any time with anything,
I'm pretty much always on GitHub :P

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.