This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This file lives in app/assets/javascripts/ | |
//It has to be required in app/assets/javascripts/application.js, not shown here | |
// | |
//It uses browser timezones to correct the client's display of dates and times in three areas of a Sharetribe site. | |
//By not changing the database, these times will always be UTC in the backend. Indeed, their values remain UTC for the client, | |
//though the display of the times in the DOM is modified. | |
const timeRegex = /((1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]))/g; | |
const daysOfWeekRegex = /(Sun|Mon|Tue|Wed|Thu|Fri|Sat)/g; |