calendar_jp 0.0.4

name: calendar_jp
description: Convert the year and the Japanese calendar mutually.
version: 0.0.4
homepage: https://github.com/tanaka0079/calendar_jp/calendar_jp
author: Daisuke Tanaka yadoran001@yahoo.co.jp

example/main.dart

void main() {
  var calender = Calendar();

  // 西暦 → 干支
  String eto = calender.yearToEto(1992);
  print(eto); // 申

  // 西暦 → 和暦
  String wareki = calender.yearToWareki(1992, 7, 23);
  print(wareki); // 平成4

  // 和暦 → 西暦
  num year = calender.warekiToYear("平成", 4);
  print(year); // 1992

  // 西暦 → 年齢
  num age = calender.yearToAge(1992, 7, 23);
  print(age); // 26
}

Use this package as a library

1. Depend on it

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


dependencies:
  calendar_jp: ^0.0.4

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.

Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
62
Overall:
Weighted score of the above. [more]
42
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, web, other

No libraries.

Health suggestions

Fix lib/src/calendar_jp_base.dart. (-2.96 points)

Analysis of lib/src/calendar_jp_base.dart reported 6 hints, including:

line 2 col 14: Use ; instead of {} for empty constructor bodies.

line 26 col 7: DO use curly braces for all flow control structures.

line 28 col 7: DO use curly braces for all flow control structures.

line 30 col 7: DO use curly braces for all flow control structures.

line 32 col 7: DO use curly braces for all flow control structures.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The package description is too short. (-8 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