GithubHelp home page GithubHelp logo

Comments (3)

b3by avatar b3by commented on July 18, 2024

With system short and long time formats, do you mean something like this?

Short -> 1/1/1970, 4:20 pm
Long -> Fri, November 1st 1970, 4:20 pm

I was thinking about extending the README a little bit, still I'm not sure about what system format means.

from atom-clock.

lee-dohm avatar lee-dohm commented on July 18, 2024

Sorry I wasn't able to get back to you on this. I got hit by the blackout yesterday and had no power or Internet for 20+ hours. On OS X (and Windows) there is a section in the OS-level preferences that allows you to set the standard date and time settings for your region. There are generally short and long date and time formats. Here's what the screen looks like in OS X:

screen shot 2015-11-18 at 2 47 46 pm

It would be great if I could just say something like os-short and it would read the format from the OS and use that.

It looks like LT and LTS come close in that they are localized based on the detected region.

from atom-clock.

b3by avatar b3by commented on July 18, 2024

You're right, Moment supports a long format with localization support too.
One possible solution could be provide some default formats, and give the user the chance to use one of those. This would mean:

  • A boolean flag in the configuration for 'Use default format'
  • A small map with some default formats translated into Moment formats.
defaultFormats:
  os-short: 'LT'
  os-medium: 'LTS'
  os-long: 'LTS z'
  ...

Still, should take a closer look to some other systems, and see if there are particular formats that make this worth it.

from atom-clock.

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.