coryetzkorn / php-store-hours

Output content based on time-of-day and-day-of-week.
MIT License
136 stars 55 forks source link

Possible separator changes #17

Open coryetzkorn opened 8 years ago

coryetzkorn commented 8 years ago

I have only one request. When a store is closed, currently it echo's a separator or '-' by default.

I have inserted a snippet ie; if($hours=='-'){ echo '' . 'Closed' . ''; } else { echo '' . $hours . ''; }

However, it would be of some added value to have a variable for that in your class ie; 'open' => "Yes, we're open!
Today's hours are {%hours%}.", 'closed' => "Sorry, we're closed
Hours today are {%hours%}", 'closed_all_day' => "Sorry, we're closed today.", 'separator' => " - ", 'nohours' => " Closed ", 'join' => " and ", 'format' => "g:ia", // options listed here: http://php.net/manual/en/function.date.php 'hours' => "{%open%}{%separator%}{%closed%}"