Giter Site home page Giter Site logo

Comments (9)

timrwood avatar timrwood commented on May 24, 2024 5

This has been released in [email protected] as moment.tz.guess().

from moment-timezone.

timrwood avatar timrwood commented on May 24, 2024

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.

mattjohnsonpint avatar mattjohnsonpint commented on May 24, 2024

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.

bkCDL avatar bkCDL commented on May 24, 2024

👍

from moment-timezone.

hirbod avatar hirbod commented on May 24, 2024

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.

jd327 avatar jd327 commented on May 24, 2024

+1

from moment-timezone.

kashifshamaz21 avatar kashifshamaz21 commented on May 24, 2024

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.

timrwood avatar timrwood commented on May 24, 2024

I opened a PR for this at #220.

from moment-timezone.

jd327 avatar jd327 commented on May 24, 2024

Nice 👍

from moment-timezone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.