Comments (9)
This has been released in [email protected]
as moment.tz.guess()
.
from moment-timezone.
Yeah, I think user timezone detection would make sense to add to moment-timezone.
In the meantime though, you should check out https://bitbucket.org/pellepim/jstimezonedetect which will probably solve your use case.
from moment-timezone.
I think this would be a very useful addition. But do consider that time zone detection is messy and error prone. Especially, consider that we would need to provide updates periodically to account for the ECMAScript 5.1 15.9.1.8 issue. Note that jsTimeZoneDetect has the same problem.
from moment-timezone.
👍
from moment-timezone.
Cool, was about to ask exact this question. I've also included https://bitbucket.org/pellepim/jstimezonedetect into my project to do some kind of this stuff here
var locale = moment.tz(date, $rootScope.defaultTimeZone).locale('de');
return locale.tz($rootScope.timezone).calendar();
So 👍
Would be a very big nice to have instead of relying again to another 3rd party solution.
Merry Christmas :)
from moment-timezone.
+1
from moment-timezone.
This feature request is a duplicate of #138, and i'm going to close this in favour of the other one as it has more discussions around the actual implementations.
Further discussions/suggestions on this feature should be carried over on #138, thanks.
from moment-timezone.
I opened a PR for this at #220.
from moment-timezone.
Nice 👍
from moment-timezone.
Related Issues (20)
- Error when using clone() and add() on a date in the America/Santiago timezone, where a daylight saving time change occurs. HOT 1
- moment().valueOf returns a value even though it's invalid HOT 2
- The DST calculation does not take effect. HOT 3
- import moment from 'moment-timezone'; import 'moment/min/locales'; not working HOT 5
- Can not set default timezone HOT 2
- Wrong timezone conversion
- error TS2350: Only a void function can be called with the 'new' keyword. new moment(); HOT 3
- 2023d is out HOT 2
- Some tz.guess() tests are failing in 2024 HOT 1
- Canada/Yukon offset before 1967 May 27 is wrong HOT 1
- How does moment.tz(unixTimestamp,timezone) and moment.tz.guess() work? HOT 1
- How can I use moment-timezone with 10 year data range with Typescript types HOT 1
- Moment Timezone has no data for Europe/Ljubljana
- Kazakhstan will switch to a single time zone, UTC+05:00, on March 1, 2024. HOT 1
- 2024a released HOT 1
- Test failure due to rounding error HOT 2
- Timezone Error in v0.5.45 HOT 1
- Wrong Kazakhstan Timezone in 0.5.45 HOT 1
- Incorrect Timezone Offset for 'Asia/Almaty' HOT 1
- The moment-timezone get the time zone of Kazakhstan Asia/Almaty in January 2024 to the DST. HOT 3
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 moment-timezone.