All Projects → michaellee → open-hours

michaellee / open-hours

Licence: other
⏰ Hours of operation

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to open-hours

Startup Landing
Collection of free top of the line startup landing templates built using react/nextjs/gatsby. Free to download, simply edit and deploy! Updated weekly!
Stars: ✭ 176 (+780%)
Mutual labels:  business
Airspace-Bootstrap-Agency-Template
Airspace is a clean, unique, and free Bootstrap website template.
Stars: ✭ 43 (+115%)
Mutual labels:  business
corebos
core Business Operating System. An OPEN SOURCE business application that helps small and medium business handle all the day to day tasks.
Stars: ✭ 128 (+540%)
Mutual labels:  business
Product Series
📚 产品迷思,不仅仅是产品经理,对于产品设计、交互体验、项目管理、行业视点等多方面的思考。
Stars: ✭ 226 (+1030%)
Mutual labels:  business
wtm-udacity-scholars-nanodegree-resources
A List of Resources for Udacity Nanodegrees
Stars: ✭ 15 (-25%)
Mutual labels:  business
edgar-crawler
Download financial reports from SEC's EDGAR. Extract clean textual data from specific item sections and bootstrap your financial NLP research. Software from the research paper published in ECONLP 2021.
Stars: ✭ 71 (+255%)
Mutual labels:  business
Openpapyrus
Sophisticated ERP, CRM, Point-Of-Sale, etc. Open source now. This system is developed since 1996.
Stars: ✭ 158 (+690%)
Mutual labels:  business
fortune500
Fortune 500 company lists since 1955 in CSV format, mostly parsed using Beautiful Soup
Stars: ✭ 78 (+290%)
Mutual labels:  business
finance-news-aggregator
A news aggregator in python, that focuses primarily on business and market news sources.
Stars: ✭ 59 (+195%)
Mutual labels:  business
open-expenses
A curated list of (private) businesses publicly sharing their expenses.
Stars: ✭ 46 (+130%)
Mutual labels:  business
Canvas Sketch
App to sketch out a business model canvas
Stars: ✭ 232 (+1060%)
Mutual labels:  business
server-monitor-ui
Server Operation Monitor
Stars: ✭ 17 (-15%)
Mutual labels:  business
docker-odoo-project
Base images for Odoo projects
Stars: ✭ 118 (+490%)
Mutual labels:  business
Tianyancha
pip安装的天眼查爬虫API,指定的单个/多个企业工商信息一键保存为Excel/JSON格式。A Battery-included Scraper API of Tianyancha, the best Chinese business data and investigation platform.
Stars: ✭ 206 (+930%)
Mutual labels:  business
PT-Tracking
Aplicação para registo e acompanhamento de encomendas da CTT Expresso, automatiza a consulta online do estado de tracking para várias remessas e mantém um registo dos pagamentos referentes aos envios à cobrança. As remessas que requerem atenção, devido a atrasos na entrega ou na receção do pagamento correspondente, bem como os cheques cuja data …
Stars: ✭ 18 (-10%)
Mutual labels:  business
Serenity
Business Apps Made Simple with Asp.Net Core MVC / TypeScript
Stars: ✭ 2,168 (+10740%)
Mutual labels:  business
crump
A parser for the Virginia State Corporation Commission's business registration records.
Stars: ✭ 18 (-10%)
Mutual labels:  business
vtiger
🐯 Vtiger is the #1 business automation software. Try it with Docker!
Stars: ✭ 59 (+195%)
Mutual labels:  business
anthem
make your odoo scripts sing
Stars: ✭ 19 (-5%)
Mutual labels:  business
bloc
A predictable state management library that helps implement the BLoC design pattern
Stars: ✭ 12 (-40%)
Mutual labels:  business

Open Hours

Add business hours of operation to your site

Open Hours lets you simply add your business' hours of operation to your site by defining a simple JavaScript object. It also determines the current day and highlights the day on visit. Open Hours doesn't have any dependencies and is written in plain JavaScript.

What's it look like?

Open Hours rendered table

How to use Open Hours

Download

Download Open Hours into your project folder.

Usage

Link the file before the closing </body> body tag in your markup.

...
<!-- This assumes that the file is on the same level as the HTML file -->
  <script src="./open-hours.js" charset="utf-8"></script>
</body>

Add an element with the id of open-hours to the document

...
  <div id="open-hours"></div>
  <script src="./open-hours.js" charset="utf-8"></script>
</body>

Then define your hours in a simple JavaScript object and pass it to OpenHours' generateTime() function. The keys must be in the format seen in the example below, where the first letter of the day of the week is capitalized. Open Hours also assumes that the order defined in the object is the order in which to render the hours of operation.

...
  <div id="open-hours"></div>
  <script src="./open-hours.js" charset="utf-8"></script>
  <script>
    const hours = {
      "Monday":     { start: 1000, end: 1800 },
      "Tuesday":    { start: 1400, end: 1800 },
      "Wednesday":  { start: 1100, end: 1900 },
      "Thursday":   { start: 1300, end: 1800 },
      "Friday":     { start: 1000, end: 1700 },
      "Saturday":   { start: 900, end: 1700 },
      "Sunday":     {}
    }

    OpenHours.generateTime(hours)
  </script>
</body>

Time format

The values for start and end accept Number values, it also assumes that the time is in 24 hour format.

So if your business starts at 9:00 AM and ends at 5:30 PM, you'll use something like this:

{
  start:  900,
  end:    1730
}

If your business is closed certain days, simply pass an object for that day without any keys.


Open Hours is by Michael Lee. If you enjoy Open Hours, tip Michael some 🍺 beer money.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].