30 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
1
answer
89
views
what's wrong with format moment js?
we have 2 isoString dates:
startedAt: '2023-10-18T14:03:36.150Z',
closedAt: '2023-10-18T18:13:33.150Z'
When I'm taking duration differences it's working good:
const duration = moment.duration(moment(...
-2
votes
2
answers
6k
views
Sat Apr 01 2023 00:00:00 GMT+0530 (India Standard Time) when converting using toISOString() function geting previous day as output why?
const currentDate = new Date();
const lastMonthStartDate = new Date(
currentDate.getFullYear(),
currentDate.getMonth() - 1,
1
);
const lastMonthEndDate = new Date(
currentDate.getFullYear(),
...
1
vote
0
answers
177
views
2022年03月27日 +1 day - Bug or my Error in javascript in function toISOString?
After adding +1 day and converting to ISO format, it will not execute correctly on the entry date 2022年03月27日.
Isn't it related to daylight saving time?
If I also added the time to the date (2022年03月07日 ...
2
votes
1
answer
1k
views
ToIsoString is not a function when I get my date object from v-datetimepicker
When I use Vuetify datetimepicker, I get the following date: "Wed Mar 16 2022 04:20:00 GMT+0100"
I need to convert this to ISO8601. But if I store this date in a variable called "date&...
0
votes
3
answers
2k
views
JavaScript - Convert date to ISOString() with milliseconds rounded to two digit
I am trying to set a date that has ISOString format but the milliseconds should be set to two digits.
If the ISOString returns 2021年11月02日T05:49:12.704Z I want it to be 2021年11月02日T05:49:12.70Z (...
0
votes
1
answer
226
views
Save IsoString with offset to database
Currently I have an app in development that would pull some data in Amazon selling partner api.
My goal is to replicate the reporting from Amazon's seller dashboard. Currently the account is is Eu ...
3
votes
1
answer
747
views
Date format acting strange in redux devtools
I'm working with an existing codebase, and the existing code calls for a date from an endpoint. The expected value is an ISO string (i.e. "2020年01月09日T07:41:02.6025984-05:00"):
// in my ...
0
votes
0
answers
39
views
I am getting an error when transforming datetime javascript
I'm using date.toISOString() to use DateTime format "yyyy-MM-dd'T'HH: mm: ss'Z '", I must use ISO 8601 format. At the time of transformation, the time is showing it 5 hours in advance, that ...
0
votes
0
answers
494
views
Angular App Error when trying to use XLSX.writeBuffer()
I'm getting a mysterious error when trying to use the xlsx.writeBuffer() method in my Angular app to try and download an Excel file to the client browser.
After finishing all the changes that needed ...
2
votes
2
answers
3k
views
toISOString() is subtracting day from value
I have this date format:
Tue Oct 20 2020 00:00:00 GMT+0100 (Central European Standard Time)
And when I do :
myValue.toISOString();
that's what I get
2020年10月19日T23:00:00.000Z
It's subtracting a day.
...
-1
votes
1
answer
55
views
The toISOString method is returning the year with a zero in front
this function:
handleChange(e) {
this.setState({
[e.target.name] : e.target.value,
displayName: (this.state.firstName.substring(0,2)) + (this.state.lastName.substring(0,2)),
...
0
votes
2
answers
282
views
Get the local date instead of UTC
The following script calculates me next Friday and next Sunday date.
The problem : the use of .toISOString uses UTC time. I need to change with something that outputs local time. I'm very new to ...
0
votes
2
answers
250
views
Compare two IsoString date in javascript
I want to compare two Iso string dates by days, date have this format :
**
"2020-05-07T15:51:28.124Z"
**
I made this function to get the result of comparison by days :
compareDatesByDays(...
1
vote
0
answers
27
views
Inconsistent date string parsing by Date().toISOString() in V8 [duplicate]
Paying with new Date().toISOString(), I observe an inconsistency in parsing of the same date in different string formats: 2020年01月01日 and 2020年01月01日:
const opt1 = new Date("2020-01-01").toISOString(...
0
votes
1
answer
213
views
JavaScript Date toISOString returns unexpected result before April 3rd, 1978
When I try the following code in my JS console, it returns the right UTC notation (-2 hours):
new Date('1978/04/03').toISOString()
-> "1978-04-02T22:00:00.000Z"
However, starting from April 2nd ...