vy_date 0.3.2

  • README.md
  • Example
  • Installing
  • Versions
  • 50

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 = Date.now();

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.3.2 #

  • Sdk 2.1.0 support.
  • Some Linter rules applied

0.3.1 #

  • Dart 2 support

0.3.0 #

  • Initial version


// 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';

void main() {
  final Date date = Date.now();
  final Date nextDay = date.add(Duration(days: 1));
  final DatePeriod period = 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:

  vy_date: ^0.3.2

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
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.3.1
  • pana: 0.12.16


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 22 col 3: Prefer using /// for doc comments.

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


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
intl ^0.15.7 0.15.8
quiver ^2.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.5.2