Comments (2)
This library don't have this feature. You can send to client the number in unix format and check it manually. For example:
const serverTime = // get it how you want
const client = dayjs();
// If difference between client and server time greater than 10 min
if (Math.abs(client.valueOf() - serverTime) < 1000 * 60 * 10) {
// Big problem
}
from dayjs.
Thanks @Imperat , agreed. It's out of the library's ability.
from dayjs.
Related Issues (20)
- dayjs("02-29") return “2001-03-01” HOT 1
- Inconsistent behaviour of diff(.., 'months) on leap days
- .diff method returns the wrong result
- add() result is wrong with timezone
- Best way to get "This Weekend" or "Next Weekend" ?
- Converting timestamp to utc returns same timestamp
- timezone output wrong result HOT 1
- fix localized format for `el` locale
- 关于闰年的 2月29日 年份加减问题?应当是多少? HOT 2
- Error in parsing array format date
- Adding a 1000 ms duration doesn't change the timestamp
- dayjs Not Working Properly in US Region when I use it with vue-hotel-datepicker.
- isValid bug
- dayjs(value, formats, true).isValid() bug
- DayJS Timezone Bug with Daylight Savings
- Converting longform Lithuanian date does not work for December
- Incorrect handling of wrong input in timzone plugin HOT 1
- Strict flag not working with `customParseFormat`
- 02-29.set("year", 2024) return 03-01
- Dates less than 1883-11-19 are given a time?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dayjs.