https://github.com/denixport/datetimex
Dart extensions for DateTime and Duration
https://github.com/denixport/datetimex
dart datetime extensions time
Last synced: 3 months ago
JSON representation
Dart extensions for DateTime and Duration
- Host: GitHub
- URL: https://github.com/denixport/datetimex
- Owner: denixport
- License: mit
- Created: 2020-02-04T00:52:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-04T01:38:43.000Z (almost 6 years ago)
- Last Synced: 2025-03-24T06:27:43.097Z (10 months ago)
- Topics: dart, datetime, extensions, time
- Language: Dart
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Extension methods for DateTime and Duration
[](https://travis-ci.org/denixport/datetimex)


[TBD]
Available extensions:
* Extension on `num` that enables durational suffixes: `1.hour`, `1.minute` etc.
Math and comparison is out of the box: `1.hour == 0.5.hour + 0.5.hour`
## Requirements
- Dart version >=2.6
## Getting Started
### Installation
1. Add an entry in your `pubspec.yaml` for `datetimex`
```yaml
dependencies:
datetimex: ^1.0.0
```
2. Run `pub get` (`flutter packages get` for Flutter)
3. Import the extension you need
```dart
import 'package:datetimex/duration.dart'; // Durational suffixes
```
## Release notes
See [CHANGELOG](CHANGELOG.md)
## Features and Bugs
Please file bugs and feature requests at the [issue tracker][tracker].
[tracker]: https://github.com/denixport/datetimex/issues