332 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-3
votes
0
answers
83
views
Strict ISO 8601 parsing fails for valid ISO strings [closed]
I'm trying to validate ISO 8601 date strings using Day.js (1.11.19 version) with strict parsing, in Node.js, but some strings that seem perfectly valid are being marked as invalid.
import dayjs from &...
1
vote
1
answer
49
views
dayjs.utc().tz() calculates wrong ISO week in production but works correctly locally
I'm encountering an issue where isoWeek() calculation returns incorrect results in production but works correctly in my local environment. The problem occurs when converting a MongoDB Date object to a ...
0
votes
1
answer
94
views
Time Zone name to Internalization [duplicate]
Intl.supportedValuesOf('timeZone')
Above code will give list of all time zone in en-US like below
["Africa/Abidjan", "Africa/Accra" , "Africa/Addis_Ababa", ...]
Is ...
0
votes
1
answer
61
views
How to allow negative years (i.e. BCE years) with MUI X Date Pickers?
I was messing about with the minDate prop on the MUI X Date Picker (specifically the DatePicker component). I was trying to set the minDate to a date with a negative year (i.e. a BCE year) in order to ...
0
votes
0
answers
159
views
I'm having an issue with dayJS when daylight saving gets triggered
Whenever I want to check the difference between 2 dates, I get a different output.
Please note that on March 9th, daylight saving started at 2 AM.
import dayjs from 'dayjs';
var utc = require("...
0
votes
0
answers
72
views
How to use dayjs duration plugin in a vue app
I have a plain HTML page (made using .NET MVC, not node or anything like that) that uses Vue for client side rendering (among other things).
<script src="~/lib/vue/dist/vue.global.js">&...
0
votes
1
answer
64
views
Wrong date in console.log
I used dayjs lib, I pass two props to component, but inside component I got wrong date,
server gave me two dates:
horizontStart: '2025-01-29T00:00:00Z'
horizontEnd: '2025-04-01T00:00:00Z'
inside ...
-2
votes
1
answer
229
views
Customise format of dayjs relative time plugin
I'm using dayjs with the RelativeTime plugin.
To get a future date:
dayjs().to(dayjs("2030年01月01日")); // "in 5 years"
dayjs().to(dayjs("2030年01月01日"), true); // ...
0
votes
0
answers
151
views
Why does Day.js return 'Invalid Date' for API date strings with timezone offsets in iOS 15 (mPaaS)?
I'm working on a project using the Mini Program mPaaS framework by Alibaba Cloud, and I'm encountering an issue with date parsing in JavaScript. Specifically, on iOS 15, my date strings (e.g., "...
2
votes
1
answer
1k
views
Upgrading Angular 18 to 19 has caused ESM warnings for dayjs
I've upgraded to Angular 19 and when I build the project I am getting a few new warnings. One of which is related to dayjs:
▲さんかく [WARNING] Module 'dayjs' used by 'projects/portal/src/app/applets/events/...
1
vote
1
answer
232
views
Date is mostly one day off and inconsistent
So, in summary, I want my dates to work in uniform. Since we are dealing with just dates and not time, how exactly can I achieve this? I have tried many ways already.
In the frontend, I am using React ...
2
votes
0
answers
112
views
dayjs: Wrong hours in diff
I have the following code fragment in node.js written in Typescript to calculate the Difference between two Dates:
import dayjs from 'dayjs'
import duration from 'dayjs/plugin/duration'
import utc ...
0
votes
1
answer
168
views
I would like display date exactly how it is on database using day.js
I have an app that I built where users can create trips. These trips have starts and end dates. Now, a user created a trip and sets the dates to be:
start date: 3rd of January, 2025
end date: 10 of ...
0
votes
1
answer
100
views
MongoDB date query
I have a collection named practices that stores documents of practices done by the users. I have 4 keys in each document.
startTime (date timestamp)
endTime (date timestamp)
user (objectID of user)
...
1
vote
0
answers
614
views
TypeScript+Vue+Vite, [vite]: Rollup failed to resolve import "dayjs"
I have a TypeScript + Vue + Vite project, where one of the files is called "timestamptz.ts" and it starts with this line:
import dayjs from "dayjs";
The tsconfig.json file ...