Search packages, repositories and app categories

GitHub repositoryKadaDev/week_of_year

week_of_year

Dart package to get the ISO week of year

week_of_year project cover
Stars
15
Forks
2
Last push (UTC)
Jul 30, 2023
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

week_of_year

Fast dependency-free extension methods to get the ISO 8601 week of year from a dart DateTime object.

Also includes a function to create a DateTime from a year and week number.

import 'package:week_of_year/week_of_year.dart';

void main() {
  final date = DateTime.now();
  print(date.weekOfYear); // Get the iso week of year
  print(date.ordinalDate); // Get the ordinal date
  print(date.isLeapYear); // Is this a leap year?

  final DateTime dateFromWeekNumber = dateTimeFromWeekNumber(2023, 13, DateTime.tuesday);
  print(dateFromWeekNumber); // 2023-02-28
}
Kåda Development GitHub avatar
GitHub author

Kåda Development ↗

LanguagesDart

Packages published by this repository

Dependencies used

Dependency list 2 items

  • lintsDevelopment>=1.0.0
  • testDevelopment>=1.10.0

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗