Skip to content

Instantly share code, notes, and snippets.

@LouisWhit
Created November 21, 2013 22:33
Show Gist options
  • Save LouisWhit/7590995 to your computer and use it in GitHub Desktop.
Save LouisWhit/7590995 to your computer and use it in GitHub Desktop.
Some features such as Events have code such as: Jan 21, 2014<br />08:00 AM - 08:30 AM that dumps out of {dateinfo}. Some clients prefer that this displays on one line. The script below will achieve that goal.
<script type="text/javascript">
var s = "{dateinfo}";
s = s.replace(/<[^>]+>[^<]*<[^>]+>|<[^\/]+\/>/ig, " at ");
document.write(s);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment