Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

192
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda