Code Monkey home page Code Monkey logo

Comments (5)

spencermountain avatar spencermountain commented on June 8, 2024 1

hey Kira, yeah I remember this being a weird thing that we didn't do terribly well.
This would be a cool feature. There may be some weird stuff with daylight-time abbreviations. I'm not sure how best to do it.

for now, i'd recommend looking at this file, which has, i think, all the information you'd need to map from one to the other.

something like this?
cheers

from spacetime.

gregorskii avatar gregorskii commented on June 8, 2024

+1 for GMT+0800 format --> standard javascript new Date().toString()

from spacetime.

spencermountain avatar spencermountain commented on June 8, 2024

hey Kira, i've got this abbreviation stuff added to 5.1.0. It was super-hard. AFIAK, this is the only timezone library to implement this kinda feature.

you can enter timezone abbreviations, like 'EST', and it will assign an IANA code, and then get abbreviations with s.timezone().display

There will be some issues, please let me know if when you find them.
cheers

from spacetime.

spencermountain avatar spencermountain commented on June 8, 2024

( https://runkit.com/spencermountain/5c2a7b4f2ace1500125ea794 )

from spacetime.

spencermountain avatar spencermountain commented on June 8, 2024

hey @wyang36 just a heads-up, I'm working on moving this abbreviation stuff to a separate package, to keep spacetime lightweight.
It'll be in v6, in the next few weeks, and will be documented in the changelog.
cheers

from spacetime.

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.