Regular Expression Date Mask Demo
Looking For A New Job?
- Expert Coldfusion Developer with extensive Microsoft Media Services expertise at Atprime Media Services
- Senior CF Backend Developer at Explosive Concepts, Inc.
- AngularJS Opportunities at Top Companies. Get Better Compensation & Culture! at AngularJobs.com
- 7 plus year CF Developer to assist live website at Atprime Media Services
Thanks a ton for this. Really needed it for making my own masks on Unix timestamps.
Hey, by the way there is what I would consider to be a "bug" in this. getMonth() is a zero based function, so months like January come back as 0 and December comes back as 11. It can be fixed like this:
"mm": ((this.getMonth()+1).toString().length == 1) ? ("0" + this.getMonth()+1) : this.getMonth()+1,
Thanks for the update. It seems to be handled differently in every language, so I am hesitant to call anything a bug. However, a zero-based month system never feels natural. You just want to say FIRST month (as in 1st as in 1) of the year.