Underc0de

Programación Web => Back-end => Mensaje iniciado por: graphixx en Agosto 02, 2015, 04:22:19 AM

Título: wdCalendar convertir horas a español
Publicado por: graphixx en Agosto 02, 2015, 04:22:19 AM
Se modifica la funcion: fomartTimeShow , tal y como se muestra en el sgte codigo: (Esta en el archivo "jquery.calendar.js").

        function fomartTimeShow(h) {
            //return h < 10 ? "0" + h + ":00" : h + ":00";
if( h > 12) {
               h = h - 12;
               return h < 10 ? "0" + h + ":00 PM" : h + ":00 PM";
            } else if(h == 0) {
               return "12:00 AM";
            } else if(h == 12) {
               return "12:00 PM";
            } else
               return h < 10 ? "0" + h + ":00 AM" : h + ":00 AM";
        }


(http://t6.pixhost.org/thumbs/3034/28655997_horas_espaol.png) (http://www.pixhost.org/show/3034/28655997_horas_espaol.png)

El resultado:
(http://t6.pixhost.org/thumbs/3034/28656008_horas_espaol_002.png) (http://www.pixhost.org/show/3034/28656008_horas_espaol_002.png)

Fuente:
http://sourceforge.net/p/jqeventcalendar/discussion/1756272/thread/6f0e0b8b/