simple_moment 0.0.2

  • Installing
  • Versions
  • 79


A simple implementation of the Moment.js features for relative time in Dart.


A simple usage example:

import 'package:simple_moment/simple_moment.dart';

main() {
    var secondsToAdd = new Duration(seconds: 10);
    var dateForComparison = new;
    var moment = new;

    // should print "in a few seconds"

Features and bugs

Please file feature requests and bugs at the issue tracker.



  • fixed a few bugs
  • better rounding


  • Initial version

1. Depend on it

Add this to your package's pubspec.yaml file:

  simple_moment: "^0.0.2"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:simple_moment/simple_moment.dart';
Version Uploaded Documentation Archive
0.0.2 Dec 31, 2016 Go to the documentation of simple_moment 0.0.2 Download simple_moment 0.0.2 archive
0.0.1 Dec 31, 2016 Go to the documentation of simple_moment 0.0.1 Download simple_moment 0.0.1 archive


We analyzed this package on Apr 23, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6


Describes how popular the package is relative to other packages. [more]
72 / 100
Code health derived from static analysis. [more]
98 / 100
Reflects how tidy and up-to-date the package is. [more]
69 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:simple_moment/simple_moment.dart.


  • Fix .analysis_options.

    We were unable to parse .analysis_options.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 hint.

    Run dartfmt to format lib/src/simple_moment_base.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

  • Enable strong mode analysis.

    Strong mode helps you to detect bugs and potential issues earlier.Start your analysis_options.yaml file with the following:

      strong-mode: true


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
Dev dependencies
test >=0.12.0 <0.13.0