{"id":18779882,"url":"https://github.com/tal7aouy/pest-datetime-plugin","last_synced_at":"2025-02-24T13:15:12.975Z","repository":{"id":247248941,"uuid":"825385901","full_name":"tal7aouy/pest-datetime-plugin","owner":"tal7aouy","description":"📅 A lightweight DateTime plugin for Pest PHP testing framework, with fluent assertions using Carbon.","archived":false,"fork":false,"pushed_at":"2024-07-07T16:27:06.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-06T21:03:58.015Z","etag":null,"topics":["carbon","datetime","pestphp","plugins"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tal7aouy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-07T16:16:03.000Z","updated_at":"2024-07-07T16:29:35.000Z","dependencies_parsed_at":"2024-07-07T16:59:35.323Z","dependency_job_id":null,"html_url":"https://github.com/tal7aouy/pest-datetime-plugin","commit_stats":null,"previous_names":["tal7aouy/pest-datetime-plugin"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tal7aouy%2Fpest-datetime-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tal7aouy%2Fpest-datetime-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tal7aouy%2Fpest-datetime-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tal7aouy%2Fpest-datetime-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tal7aouy","download_url":"https://codeload.github.com/tal7aouy/pest-datetime-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240483759,"owners_count":19808636,"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":["carbon","datetime","pestphp","plugins"],"created_at":"2024-11-07T20:23:37.217Z","updated_at":"2025-02-24T13:15:12.653Z","avatar_url":"https://github.com/tal7aouy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📅 PestDateTime Plugin\n\nPestDateTime is a plugin for Pest PHP testing framework that provides intuitive date and time assertions using Carbon.\n\n[![Tests](https://github.com/tal7aouy/pest-datetime-plugin/actions/workflows/tests.yml/badge.svg)](https://github.com/tal7aouy/pest-datetime-plugin/actions/workflows/tests.yml) ![Packagist Version](https://img.shields.io/packagist/v/tal7aouy/pest-datetime-plugin) ![Packagist License](https://img.shields.io/packagist/l/tal7aouy/pest-datetime-plugin)\n\n## Installation\n\nInstall via Composer:\n\n```bash\ncomposer require tal7aouy/pest-datetime-plugin\n```\n\n## Usage\n\n### Example: Checking if Date is Today\n\n```php\nuse Carbon\\Carbon;\n\ntest('Check if date is today', function (): void {\n    expect(Carbon::now())-\u003etoBeToday();\n});\n```\n\n### Available Assertions\n\n- **toBeToday()**: Asserts that the date matches today's date.\n- **toBeInThePast()**: Asserts that the date is in the past.\n- **toBeInTheFuture()**: Asserts that the date is in the future.\n- **toBeSameDayAs($date)**: Asserts that the date is the same day as the given `$date`.\n- **toBeWithinLastDays($days)**: Asserts that the date is within the last `$days`.\n- **toBeWithinNextDays($days)**: Asserts that the date is within the next `$days`.\n- **toBeOnWeekend()**: Asserts that the date falls on a weekend.\n- **toBeOnWeekday()**: Asserts that the date falls on a weekday.\n- **toBeBetweenDates($startDate, $endDate)**: Asserts that the date falls between `$startDate` and `$endDate`.\n\n## Contributing\n\nContributions and feedback are welcome! Please feel free to open issues or submit pull requests.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftal7aouy%2Fpest-datetime-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftal7aouy%2Fpest-datetime-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftal7aouy%2Fpest-datetime-plugin/lists"}