Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular
- .module("tuApp")
- .filter("fechaCorta", function () {
- return function (fecha) {
- if (!fecha) return "";
- fecha = new Date(fecha);
- return (fecha.getDate() > 9 ? fecha.getDate() : "0" + fecha.getDate()) + "/" + (["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"][fecha.getMonth()]) + "/" + fecha.getFullYear()
- };
- });
Add Comment
Please, Sign In to add comment