Questions tagged as 'momentjs'

1
answer

Why is this call inserted automatically into the body of HTML?

In an app I'm using the javascript libraries: jQuery, Angular, Angular Material, and Moment. Totalizing I have the following calls in my file: <script src="vendor/jquery/jquery-3.1.1.js" type="text/javascript"></script><script s...
asked by 31.10.2016 / 21:20
2
answers

How to format date with Moment.js?

I need to format a date with Moment.js like this: 10 de Dezembro/2018. I tried this way: "DD [de] MMMM/YYYY" But the month is 1 lowercase letter. What's wrong?     
asked by 10.12.2018 / 19:53
2
answers

Difference between start date and end date with moment js

I need to tell you how much time I have for a certain timer, I have the date from which I started the event. I'm developing with angular 4 typescript and I use plugin moment js In my html I'm doing this: <div class="row ca...
asked by 01.11.2017 / 15:26
1
answer

Manipulation MomentJS

I'm using moment.js to validate some dates and I've used the moment().weeksInYear() function to check which week of the year we're in. I need to make a date forecast, after the user tells me a date, I can calculate how many weeks will...
asked by 01.06.2017 / 14:32
2
answers

How to get the last day of a month with MomentJS?

I'm using MomentJS and I need to get the first and last day of the current month. Currently, to get the first day of the month I'm doing this: var data_inicial = moment().format('01/MM/YYYY') So far so good, since every month sta...
asked by 19.09.2018 / 15:03
2
answers

How to get the correct date using momentjs

Personal speech. I'm having some problem trying to use the library momentjs to work with dates. My problem is described below. ****--------- Datetime ----------**** Timestamp recebido do banco de dados -> 2016-07-12 17:21:40 <- ES...
asked by 13.07.2016 / 16:28
2
answers

Momentjs - How to add / subtract datetime?

Follow the code below: var value = '/Date(1533227866063)/'; var utc = moment().utcOffset() / 60; // -180 / 60 = -3 var datetime_utc = moment(value).format("DD/MM/YYYY HH:mm"); // 02/08/2018 13:37 var convertDatetime = ??? // 02/08/2018 10:37...
asked by 03.08.2018 / 15:03
1
answer

How to use moment.js with date coming from an input date?

I have the following form: <form name="formConsultaPeriodo"> Data Inicial <input class="form-control dataIni" type="date" name="dataIni" ng-model="consulta.dataInicial" required /> Data Final <input class="form-c...
asked by 03.04.2018 / 21:07
1
answer

Doubt Javascript Date () [front-end]

I'm building a personal blog using GitHub Pages and a desktop app with NWJS to do the back end administration however I have a big question when presenting dates on the front end. Because this is a "static" site, the posts are markdown...
asked by 07.08.2017 / 08:24
1
answer

How to use emit and computed / watch

I'm new to VueJS and started to develop a project to study a time release and time worked spreadsheet. I'm using the Laravel 5.5 project with Vuejs 2 and MomentJS to calculate the differences. But I could not figure out how to use the emit...
asked by 22.02.2018 / 03:19