If anyone is interested, I put together this little demo for a dude who posted a comment on my site. It demonstrates how to apply a date and time mask to a Javascript Date object using regular expressions. It creates two methods that are prototyped to the Javascript Date object and therefore are available to all dates:

  • Date.prototype.dateFormat()
  • Date.prototype.timeFormat()

Regular Expression Date Mask Demo

www.bennadel.com/resources/demo/2/