{"id":28426726,"url":"https://github.com/keep94/datemath","last_synced_at":"2025-06-24T22:31:24.302Z","repository":{"id":5676957,"uuid":"6886881","full_name":"keep94/datemath","owner":"keep94","description":"Perform arithmetic with python datetime.date objects.","archived":false,"fork":false,"pushed_at":"2012-12-01T06:22:47.000Z","size":128,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-05T11:11:37.728Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keep94.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-27T16:36:10.000Z","updated_at":"2013-10-11T06:02:43.000Z","dependencies_parsed_at":"2022-09-05T06:30:39.297Z","dependency_job_id":null,"html_url":"https://github.com/keep94/datemath","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/keep94/datemath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keep94%2Fdatemath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keep94%2Fdatemath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keep94%2Fdatemath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keep94%2Fdatemath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keep94","download_url":"https://codeload.github.com/keep94/datemath/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keep94%2Fdatemath/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261766638,"owners_count":23206664,"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":[],"created_at":"2025-06-05T11:10:53.314Z","updated_at":"2025-06-24T22:31:24.295Z","avatar_url":"https://github.com/keep94.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"datemath\n========\n\nPerform arithmetic with python datetime.date objects.\n\n# Figure out how many years, months, days from now until Christmas 2030.\n\n    import datetime\n    import duration\n\n    print duration.Duration.ForPeriod(\n        datetime.datetime.now().date(),\n        datetime.date(2030, 12, 25),\n        duration.Duration(year=1, month=1, day=1))\n\n# Find out the next time you will be a multple of 100 weeks old.\n\n    import datetime\n    import duration\n\n    your_birthday = datetime.date(1990, 5, 25)\n    now = datetime.datetime.now().date()\n    dur = duration.Duration(week=100)\n    count = dur.Count(your_birthday, now)\n    print dur.AddTo(your_birthday, multiply=count + 1)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeep94%2Fdatemath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeep94%2Fdatemath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeep94%2Fdatemath/lists"}