Content Model for Storing Time Data - e.g. Opening Times
Last updated: Apr 8, 2020
Can anyone help me with the best way to store a time only? Like if I wanted to have a page listing store hours...something like:Mon - Thurs: 8 :00am-8:00pmFri - Sat: 8 :00am-10:00pmSun: 8 :00am-6:00pm What does that content model look like?
Apr 8, 2020, 12:26 PM
Hi ! There is several options for this.Maybe as simple as a "text" field with free text content inside or as granular as : An array field of open days object. Each Open days object is an array of opening hours object And each opening hours object a combination of two fields : a start time and a end time (could be text fields, or maybe datetime, or custom time input).
This way each day could have several opening hours allowing for a mid-day break.