ms_datetime_extensions 0.1.0+1

  • Readme
  • Changelog
  • Example
  • Installing
  • new56

Overview Pub GitHub stars #

A simple lib to incremease DateTime with usefull functions

Whats Ms_DateTime_Extensions do #

Add usefull functions to DateTime:

  • nextWeekday return a new DateTime to a next weekday
  • fromInternet fetch a DateTime from internet

Usage #

Just import lib and use extensions, call the functions to starts work:

import 'package:ms_datetime_extensions/ms_datetime_extensions.dart';

  var xmas = DateTime(2020, 12, 25, 15, 00); // Friday 25 december of 2020
  var nextFriday =
      xmas.nextWeekday(DateTime.friday); // Friday 01 january of 2021
  print(nextFriday);

  var mDateTimeFromInternet = await dateTimeFromInternet();

Changelog #

[0.1.0+1] - 10/03/2020 #

  • flutter format
  • better lib description

[0.1.0] - 10/03/2020 #

First Release #

  • get DateTime from internet
  • get DateTime to next weekday

example/main.dart

import 'package:ms_datetime_extensions/ms_datetime_extensions.dart';

Future<void> main(List<String> args) async {
  var xmas = DateTime(2020, 12, 25, 15, 00); // Friday 25 december of 2020
  var nextFriday =
      xmas.nextWeekday(DateTime.friday); // Friday 01 january of 2021
  print(nextFriday);

  var myDateTimeFromInternet = await dateTimeFromInternet();
  print(myDateTimeFromInternet);
}

Use this package as a library

1. Depend on it

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


dependencies:
  ms_datetime_extensions: ^0.1.0+1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:ms_datetime_extensions/ms_datetime_extensions.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
12
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
56
Learn more about scoring.

We analyzed this package on Mar 30, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health issues and suggestions

Document public APIs. (-0.68 points)

364 out of 368 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
http ^0.12.0 0.12.0+4
Transitive dependencies
async 2.4.1
charcode 1.1.3
collection 1.14.12
http_parser 3.1.4
meta 1.1.8
path 1.6.4
pedantic 1.9.0
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
flutter_test