{"id":16272476,"url":"https://github.com/chinleung/php-weekday","last_synced_at":"2026-01-20T11:32:50.130Z","repository":{"id":62501830,"uuid":"199908597","full_name":"chinleung/php-weekday","owner":"chinleung","description":"Easily get name of weekday and value from name between different languages.","archived":false,"fork":false,"pushed_at":"2020-04-27T18:29:25.000Z","size":90,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T22:38:06.529Z","etag":null,"topics":["localization","php","translation","weekday"],"latest_commit_sha":null,"homepage":null,"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/chinleung.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-31T18:25:28.000Z","updated_at":"2020-04-27T18:22:43.000Z","dependencies_parsed_at":"2022-11-02T09:46:31.488Z","dependency_job_id":null,"html_url":"https://github.com/chinleung/php-weekday","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinleung%2Fphp-weekday","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinleung%2Fphp-weekday/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinleung%2Fphp-weekday/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinleung%2Fphp-weekday/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chinleung","download_url":"https://codeload.github.com/chinleung/php-weekday/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247730069,"owners_count":20986404,"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":["localization","php","translation","weekday"],"created_at":"2024-10-10T18:17:56.246Z","updated_at":"2026-01-20T11:32:50.125Z","avatar_url":"https://github.com/chinleung.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Weekday\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/chinleung/php-weekday.svg?style=flat-square)](https://packagist.org/packages/chinleung/php-weekday)\n[![Build Status](https://img.shields.io/travis/chinleung/php-weekday/master.svg?style=flat-square)](https://travis-ci.org/chinleung/php-weekday)\n[![Quality Score](https://img.shields.io/scrutinizer/g/chinleung/php-weekday.svg?style=flat-square)](https://scrutinizer-ci.com/g/chinleung/php-weekday)\n[![Total Downloads](https://img.shields.io/packagist/dt/chinleung/php-weekday.svg?style=flat-square)](https://packagist.org/packages/chinleung/php-weekday)\n\nEasily get name of weekday and value from name between different languages.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require chinleung/php-weekday\n```\n\n## Usage\n\n### Retrieve a name from a value\n\n``` php\nWeekday::getNameFromValue(0, 'en'); // Sunday\n(new Weekday(0, 'en'))-\u003egetName(); // Sunday\n```\n\n### Retrieving a name from a value for a different locale\n\n``` php\nWeekday::getNameFromValue(0, 'fr'); // Dimanche\n(new Weekday(0, 'en'))-\u003egetName('fr'); // Dimanche\n```\n\n### Retrieving a value from the name\n\n``` php\nWeekday::getValueFromName('Sunday', 'en'); // 0\nWeekday::getValueFromName('Lundi', 'fr'); // 1\n(new Weekday('wednesday', 'en'))-\u003egetName(); // 3\n```\n\n### Retrieving all names for a locale\n\n``` php\nWeekday::getNames('en'); // ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n```\n\n### Changing the locale of an instance\n\n``` php\n(new Weekday(1, 'en'))-\u003esetLocale('fr')-\u003egetName(); // Lundi\n```\n\n### Testing\n\n``` bash\ncomposer test\n```\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Security\n\nIf you discover any security related issues, please email hello@chinleung.com instead of using the issue tracker.\n\n## Credits\n\n- [Chin Leung](https://github.com/chinleung)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## PHP Package Boilerplate\n\nThis package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinleung%2Fphp-weekday","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchinleung%2Fphp-weekday","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinleung%2Fphp-weekday/lists"}