Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

196
Vistas
How to remove hour from links like this: "2022-06-28T00:00:00+03:00&end=2022-06-30T23:59:59+03:00"

i have a problem in laravel with links in a fullcalednar script. I need the links to be only with date: 2022-06-28 not with T00:00:00+03:00. i do this but not work any ideea?

 // timeZoneOffset is in minutes
function buildIsoString(marker, timeZoneOffset, stripZeroTime) {
    if (stripZeroTime === void 0) { stripZeroTime = false; }
    var s = marker.toISOString();
    s = s.replace('.000', '');
    if (stripZeroTime) {
        s = s.replace('T00:00:00Z', '');
    }
    if (s.length > 10) { // time part wasn't stripped, can add timezone info
        if (timeZoneOffset == null) {
            s = s.replace('Z', '');
        }
        else if (timeZoneOffset !== 0) {
            s = s.replace('Z', formatTimeZoneOffset(timeZoneOffset, true));
        }
        // otherwise, its UTC-0 and we want to keep the Z
    }
    return s;
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I don't fully understand the problem. So, please bear with me.

If you want to strip the hours, minutes, seconds and miliseconds from an ISO string (from Date.toISOString()) you can simply do the following:

  • Option 1: isoString = isoString.slice(0, 10);
  • Option 2: isoString = isoString.replace(/T.*$/, "");

I'm not sure this answers your question. I would need to know more about how and where the buildIsoString function is being called and what the formatTimeZoneOffset does.

I hope this helps.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda