You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure where else to ask this, sorry if an issue is not the right place.
I am, however, looking for a feature similar to opening-hours.js getOpenIntervals(to, from).
The end-result I am looking for, is a table (hash) that shows, for the current week, per-day, what either the intervals are, or per-minute arrays. Both would work for me.
My current node.js API returns the following, and I am trying to replace that node.js server app with a ruby server app (sinatra etc).
So, basically: a Hash, with, per day, when it will be open. As said, i don't really mind if it has, per day, a list of the intervals (as in the above example) or if it has, per day, an array with per-minute true | false.
I manage to get typical_weeks out of this Ruby gem, but not a week given a specific date: in several occasions, that might be different. I also don't really care about PH just yet.
If you can help me on the way, I would be grateful. And will pay back with documenting the parts that I then understand in a PR 😄
The text was updated successfully, but these errors were encountered:
I'm not sure where else to ask this, sorry if an issue is not the right place.
I am, however, looking for a feature similar to opening-hours.js
getOpenIntervals(to, from)
.The end-result I am looking for, is a table (hash) that shows, for the current week, per-day, what either the intervals are, or per-minute arrays. Both would work for me.
My current node.js API returns the following, and I am trying to replace that node.js server app with a ruby server app (sinatra etc).
Given, the opening-hours string
Mo-Fr 10:00-12:30,13:00-18:30; Sa 10:00-13:00; Su 12:00-17:00 "Shopping Sundays"
And today is
1989-11-07
. So this week starts onmonday 1989-11-06
and ends onsunday 1989-11-12
.Then I want, approximately the following JSON (hash structure) outputted:
So, basically: a Hash, with, per day, when it will be open. As said, i don't really mind if it has, per day, a list of the intervals (as in the above example) or if it has, per day, an array with per-minute
true | false
.I manage to get
typical_week
s out of this Ruby gem, but not a week given a specific date: in several occasions, that might be different. I also don't really care aboutPH
just yet.If you can help me on the way, I would be grateful. And will pay back with documenting the parts that I then understand in a PR 😄
The text was updated successfully, but these errors were encountered: