{"id":15516193,"url":"https://github.com/devj3ns/isoweek","last_synced_at":"2025-04-23T03:27:35.523Z","repository":{"id":40943879,"uuid":"296878207","full_name":"devj3ns/isoweek","owner":"devj3ns","description":"A lightweight Dart package which provides the class Week (based on the ISO 8601 format). ","archived":false,"fork":false,"pushed_at":"2022-06-22T12:03:02.000Z","size":18,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T21:41:21.413Z","etag":null,"topics":["dart","flutter","isoweek","package"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/isoweek","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devj3ns.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-19T13:43:36.000Z","updated_at":"2023-11-30T03:40:41.000Z","dependencies_parsed_at":"2022-08-29T08:00:44.955Z","dependency_job_id":null,"html_url":"https://github.com/devj3ns/isoweek","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devj3ns%2Fisoweek","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devj3ns%2Fisoweek/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devj3ns%2Fisoweek/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devj3ns%2Fisoweek/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devj3ns","download_url":"https://codeload.github.com/devj3ns/isoweek/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250363248,"owners_count":21418220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","isoweek","package"],"created_at":"2024-10-02T10:06:00.912Z","updated_at":"2025-04-23T03:27:35.503Z","avatar_url":"https://github.com/devj3ns.png","language":"Dart","funding_links":["https://www.buymeacoffee.com/devj3ns"],"categories":[],"sub_categories":[],"readme":"# isoweek\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://pub.dev/packages/isoweek\"\u003e\u003cimg src=\"https://img.shields.io/pub/v/isoweek?color=green\" alt=\"pub.dev badge\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/devj3ns/isoweek/commits/main\"\u003e\u003cimg alt=\"GitHub commit activity\" src=\"https://img.shields.io/github/commit-activity/m/devj3ns/isoweek?color=blue\u0026label=commits\"\u003e\u003c/a\u003e\n\u003cbr\u003e\n\u003ca href=\"https://www.buymeacoffee.com/devj3ns\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-blue.png\" alt=\"Buy Me A Coffee\" height=\"42px\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nA lightweight Dart package which provides the class Week (based on the local time). Instances represent specific weeks spanning Monday to Sunday. \nAn ISO week-numbering year has 52 or 53 full weeks. Week 1 is defined to be the first week with 4 or more days in January.\n\nIt’s called isoweek because this is the week definition of [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).\nThis package is inspired by the [isoweek Python package](https://pypi.org/project/isoweek/).\n\n### Example\n\n```dart\nimport 'package:isoweek/isoweek.dart';\n\nvoid main() {\n  Week currentWeek = Week.current();\n  print('Current week: $currentWeek');\n  //OUTPUT: 2021W13\n\n  print('Days of current week: ${currentWeek.days}');\n  //OUTPUT: [2021-03-29 00:00:00.000, 2021-03-30 00:00:00.000, ...]\n\n  Week nextWeek = currentWeek.next;\n  print('Days of next week: ${nextWeek.days}');\n  //OUTPUT: Days of next week: [2021-04-05 00:00:00.000, 2021-04-06 00:00:00.000, ...]\n\n  Week previousWeek = currentWeek.previous;\n  print('Days of previous week: ${previousWeek.days}');\n  //OUTPUT: Days of previous week: [2021-03-22 00:00:00.000, 2021-03-23 00:00:00.000, ...]\n\n  Week futureWeek = currentWeek.addWeeks(5);\n  print('5 weeks ahead: $futureWeek');\n  //OUTPUT: 5 weeks ahead: 2021W18\n\n  Week birthdayWeek = Week.fromDate(DateTime(2020, 11, 16));\n  print(\n      'The week number of my birthday in 2020 was ${birthdayWeek.weekNumber}');\n  //OUTPUT: The week number of my birthday in 2020 was 47\n\n  Week weekFromIso = Week.fromISOString('2021W25');\n  print('Week from ISO string: $weekFromIso');\n  //OUTPUT: Week from ISO: 2021W25\n\n  DateTime firstDay = weekFromIso.day(0);\n  print('The Week $weekFromIso starts with $firstDay');\n  //OUTPUT: The Week 2021W25 starts with 2021-06-21 00:00:00.000\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevj3ns%2Fisoweek","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevj3ns%2Fisoweek","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevj3ns%2Fisoweek/lists"}