{"id":15774329,"url":"https://github.com/zomars/bolt-store-hours","last_synced_at":"2026-01-20T03:34:52.474Z","repository":{"id":73519348,"uuid":"61584327","full_name":"zomars/bolt-store-hours","owner":"zomars","description":"An extension to add business hours as a field type within Bolt","archived":false,"fork":false,"pushed_at":"2016-12-22T19:40:33.000Z","size":50,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T18:02:38.387Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/zomars.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-20T22:20:34.000Z","updated_at":"2016-12-22T18:40:55.000Z","dependencies_parsed_at":"2023-06-01T06:45:38.623Z","dependency_job_id":null,"html_url":"https://github.com/zomars/bolt-store-hours","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zomars%2Fbolt-store-hours","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zomars%2Fbolt-store-hours/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zomars%2Fbolt-store-hours/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zomars%2Fbolt-store-hours/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zomars","download_url":"https://codeload.github.com/zomars/bolt-store-hours/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247631258,"owners_count":20970036,"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":"2024-10-04T16:21:14.659Z","updated_at":"2026-01-20T03:34:52.432Z","avatar_url":"https://github.com/zomars.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Bolt Store Hours\n======================\n\nThis [bolt.cm](https://bolt.cm/) extension adds business hours as a field type within Bolt based on [PHP Store Hours](https://github.com/coryetzkorn/php-store-hours).\n\nPHP Store Hours is a simple PHP class that outputs content based on time of the day and day of the week.\n\nSimply adjust opening and closing hours for each day of the week and you can output content based on the time ranges you specify.\n\n### Installation\n1. Login to your Bolt installation\n2. Go to \"Extend\" or \"Extras \u003e Extend\"\n3. Type `bolt-store-hours` into the input field\n4. Click on the extension name\n5. Click on \"Browse Versions\"\n6. Click on \"Install This Version\" on the latest stable version\n\n### Configuration\n\nTo use this extension, you should add a field to your contenttypes, and use the\ntags in your twig templates accordingly.\n\nIn your contenttypes, you should add a single `storehours` field. The extension\nwill use this to store the data for each weekday that show in the\nbackend when editing a record. Simply add it to your fields like this:\n\n```yaml\nbusiness:\n    name: Businesses\n    singular_name: Business\n    fields:\n        [..]\n        hours:\n            type: storehours\n```\n\nAfter you've done this, it will look like this in the Bolt backend:\n\n![screenshot](https://cloud.githubusercontent.com/assets/3504472/16212217/73c1d028-3703-11e6-9c3a-ead074774f75.png)\n\n### Use\n\nYou can use `store_hours_is_open()` to return true or false if the store is open.\n```twig\n    {{ store_hours_is_open(record.hours) }} {# Returns true or false #}\n```\nOr you can display today's hours by doing:\n```twig\n{% for hour in store_hours_hours_today(record.hours) %}\n    {% set this_day_hours = hour|split('-') %}\n    Open: {{ this_day_hours[0]|date('g:i a') }}\n    Close: {{ this_day_hours[1]|date('g:i a') }}\n{% endfor %}\n```\n\n**Note:** This is a new extension, so the functionality is still pretty bare\nbones. What's there works well, but there is probably a lot of functionality to\nadd and improve. If you'd like to contribute, or have a good idea, feel free to\nopen an issue on the tracker at the [Bolt Store Hours repository](https://github.com/zomars/bolt-store-hours/issues)\non Github.\n\n---\n\n### License\n\nThis Bolt extension is open-sourced software licensed under the [Your preferred License]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzomars%2Fbolt-store-hours","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzomars%2Fbolt-store-hours","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzomars%2Fbolt-store-hours/lists"}