nholiday_jp 1.0.1 copy "nholiday_jp: ^1.0.1" to clipboard
nholiday_jp: ^1.0.1 copied to clipboard

outdated

Public holidays in Japan. This is based on the national holiday law.

日本の祝日

Usage #

A simple usage example:

import 'package:nholiday_jp/nholiday_jp.dart';

main() {
  // 2019年1月1日が祝日ならその名称を取得
  var name = NHolidayJp.getName(2019, 1, 1); // 元日

  // 2019年1月の祝日一覧
  var holidaysOfMonth = NHolidayJp.getByMonth(2019, 1);
  // holidaysOfMonth[0].toString() => '1/1 元日'
  // holidaysOfMonth[1].toString() => '1/14 成人の日'

  // 2019年の祝日一覧
  var holidaysOfYear = NHolidayJp.getByYear(2019);
  // holidaysOfYear[0].toString() => '1/1 元日'
  // holidaysOfYear[1].toString() => '1/14 成人の日'
  // ...
  // ...
  // holidaysOfYear[20].toString() => 11/4 振替休日
  // holidaysOfYear[21].toString() => 11/23 勤労感謝の日
}
3
likes
40
points
541
downloads

Publisher

verified publisherramorio.tk

Weekly Downloads

Public holidays in Japan. This is based on the national holiday law.

Repository (GitHub)

License

MIT (license)

More

Packages that depend on nholiday_jp