8,150
questions
0
votes
1
answer
17
views
Get date range using moment.js
I am trying to get a Saturday to Sunday date range using moment.js.
It works up to last line and after that both start and end dates equal to end date.
Using today's date (Nov. 1, 2024), I can see ...
1
vote
1
answer
52
views
Setting moment value to specific time zone directly
We are using Moment v2.30.1. We are attempting to apply a StartDateTime to an object but it is always being set to utc(). We want to set it directly to
the America/Chicago time zone.
Here is the ...
1
vote
1
answer
57
views
How to use string time data with moment.js in Chartjs
I have an array of lap times as strings shown below:
['00:01:41.413000', '00:01:38.790000', '00:01:38.917000', '00:01:38.470000', '00:01:37.906000', '00:01:37.997000', '00:01:37.774000', '00:01:37....
0
votes
0
answers
33
views
Uncaught TypeError: Cannot read properties of undefined (reading 'fn') at moment-duration-format
I am trying to use moment-duration-format for getting duration.
https://www.npmjs.com/package/moment-duration-format
I am getting error:-
moment-duration-format.js?t=1727769487718&v=a4aab22f:155 ...
0
votes
0
answers
21
views
date issues when storing and accessing date from firebase datastore
I have an app built using Ionic angular and Google Firebase. I use fire store and store dates using the method (new Date()).getTime() from my code. One of the things I am facing is the issue when I ...
0
votes
0
answers
39
views
moment doing wrong calculations for day of the year
I am trying to find the day of the year using unix epoch and it returns 365 instead of the correct value. here is the code snippet
const momentY = moment(new Date(startDate))
startDays = momentY....
1
vote
0
answers
34
views
Vite Moment locale ignore
With webpack we used IgnorePlugin like this
const webpack = require('webpack')
module.exports = {
configureWebpack: {
plugins: [
new webpack.IgnorePlugin({
resourceRegExp: /^\.\/...
0
votes
2
answers
95
views
How to convert this "string" to a correct date?
Struggling to display a date in javascript that is retrieved from a postgres database and returned via python.
When I simply console.log the variable I get back from my GET request, it is in this ...
-1
votes
1
answer
53
views
Could not resolve require("./locale/**/*")
I am using Vite+React. I am getting error while running npm run dev.
"[ERROR] Could not resolve require("./locale/**/*")
node_modules/moment-with-locales-es6/node_modules/moment/min/...
0
votes
2
answers
61
views
Convert moment time to milliseconds
I want to convert moment time to milliseconds.
I have next code:
const moment = require("moment")
const countdown = "00:02:32"
const millis = moment(countdown, "hh:mm:ss"...
0
votes
1
answer
23
views
Count and check difference in timer countdown
I have timer countdown which starts from for example 04:00 (minutes:seconds).
And I want to check that timer is in diapason of 10 seconds.
I understand that need to convert time string to time and ...
0
votes
2
answers
38
views
using momentjs to fetch data from backend
I am trying to fetch data from the backend that has the trip status set to "upcoming"
but I want to conditionally fetch it using my current time. It should only fetch data that is max 15 ...
0
votes
1
answer
54
views
Change date with button (prev-next) from calendar using only moment library
I want the date to change month when the prev and next buttons are clicked.
The following code is working, as you can see.
It just seems like dirty code to me.
document.getElementById('nextdate')....
0
votes
0
answers
18
views
How to disable DateTimePicker Options Based on Multiple time interval Selection?
I have a workHours Object where each day can have multiple work time like this
monday: {
active: true,
hours: [
{ from: '09:00', to: '12:00' },
{ from: '17:00', to: '23:30' }
...
0
votes
0
answers
39
views
Issue with Sorting French Dates in DataTables
I'm working on a React application using DataTables to display data. I'm using two additional plugins: one for French language support and another for date sorting (ultimate-datetime-sorting). The ...