momentjs

Declination in moment.js

There is a feature in momentjs that allows you to tilt the days. For example, 1 day, 2 days, 5 days. But here's how to do it - I have no idea. I've already searched the documentation. Maybe someone knows?

moment.js date output

Hello. I use the moment.js library. I'm trying to display the time difference in the desired format. And here I can not unde ... time difference in this format: YYYY-MM-DD HH:mm:ss. What you need to do to implement the date output in the desired format?

Convert a date to another format

How do I convert a date in YYYY-MM-DD[T]HH:mm:ss.SSS[Z] format (for example 2017-09-21T21:00:00.000Z) to DD.MM.YYYY format (for example 11.05.2017)? You can use moment.

Convert minutes to hours+minutes using momentjs

How do I convert minutes to hours? For example, I have the number 61, which is equal to one hour and one minute. How do I tur ... the number 61 into '1h. 1m'? My design doesn't work: let time = moment(moment.duration(num, 'minutes')).format('Hч. Mм.');

How do I get the correct month number in moment js?

const now = new Date(); const formatedDateAppend = moment(now).format('D-M-YYYY'); console.log(formatedDateAppend); & ... It's October now. But instead of 4.9.2018, it outputs 4.10.2018. How can I make the month number start with 1 instead of 0?

How to use emit and computed / watch

I'm new with VueJS and I started to develop a project to study a worksheet for launching hours and calculating hours worked. ... n to update The worked as it is editing the line, would help me understand better how this process of computed / watch works.

How to format date with the name of the month in Portuguese and with capital letter at the Moment.js?

I need to format a date with Moment.js like this: 10 de Dezembro/2018. I tried like this: "DD [de] MMMM/YYYY" But the month gets the 1 lowercase letter. What's wrong?

Add hours as Moment.Js

I have a table with the following fields: But I do not want to work with date and time together, I would like to know if ... and add, but I only want the total result of each date, so I can show the user how much he worked per day. Is that possible?

How to add days to a date with Moment.js?

I'm trying to calculate the term of my site in days, i.e. I put "14 days" and it turns into 00/00/0000. I'm doing this way, b ... s( moment() .startOf('day') .diff(moment(date).startOf('day'), 'days'), ); } How to get to that?

Custom filtering - search by range-DataTables

I'm using one of the functions of DataTables which is search by range, but this type of search only accepts integer numbers. ... || (min <= age && age <= max)) { return true; } return false; } );

Problem with time formatting when using Moment.js and Dialogflow

I'm having a problem typing some time in Dialogflow for my chatbot. I know that the system works with AM and PM, but I tried ... let tempo = moment(agent.parameters.time).tz('America/Recife').format('HH:mm'); agent.add(`${data} às ${tempo}`); }