vy_date 0.3.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 49

vy_date #

Simple utilities for managing dates and periods.

The Date class simply wraps the DateTime one. But I think it is easier to manage and to understand the logic of the program this way. license.

Usage #

A simple usage example:

import 'package:vy_date/vy_date.dart';

main() {
  Date date = new Date.now();
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.3.0 #

  • Initial version

example/example.dart

// Copyright (c) 2017, Giorgio. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:vy_date/vy_date.dart';

main() {
  Date date = new Date.now();
  Date nextDay = date.add(new Duration(days: 1));
  DatePeriod period = new DatePeriod(date, nextDay);
  // prints: "Number of days: 2"
  print('Number of days: ${period.inDays}');
}

Use this package as a library

1. Depend on it

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


dependencies:
  vy_date: ^0.3.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:vy_date/vy_date.dart';
  
Version Uploaded Documentation Archive
0.3.2 Jan 19, 2019 Go to the documentation of vy_date 0.3.2 Download vy_date 0.3.2 archive
0.3.1 Aug 24, 2018 Go to the documentation of vy_date 0.3.1 Download vy_date 0.3.1 archive
0.3.0 Jul 21, 2018 Go to the documentation of vy_date 0.3.0 Download vy_date 0.3.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
98
Overall:
Weighted score of the above. [more]
49
Learn more about scoring.

We analyzed this package on May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.0
  • pana: 0.12.15

Platforms

Detected platforms: Flutter, web, other

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

Health suggestions

Fix lib/src/date.dart. (-1 points)

Analysis of lib/src/date.dart reported 2 hints:

line 23 col 3: Prefer using /// for doc comments.

line 89 col 3: Prefer using /// for doc comments.

Fix lib/src/date_period.dart. (-0.50 points)

Analysis of lib/src/date_period.dart reported 1 hint:

line 17 col 3: Avoid return types on setters.

Maintenance suggestions

The package description is too short. (-2 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
intl ^0.15.7 0.15.8
quiver ^2.0.0+1 2.0.3
Transitive dependencies
matcher 0.12.5
meta 1.1.7
path 1.6.2
stack_trace 1.9.3
Dev dependencies
test ^1.3.0