Giter Club home page Giter Club logo

atom-date's Introduction

Hi there ๐Ÿ‘‹

I am interested in web development ๐ŸŒ, games ๐Ÿ‘พ, game engines ๐ŸŽฎ, graphics ๐ŸŽจ, biking ๐Ÿšฒ, urban planning ๐Ÿ™๏ธ, nature ๐ŸŒณ, birds ๐Ÿฆ, and politics ๐Ÿ›๏ธ.

Rust ๐Ÿฆ€ & TypeScript ๐Ÿ“˜ are my favorite programming languages to use. But I know many more!

atom-date's People

Contributors

bkleinen avatar dannyfritz avatar gahrae avatar laktak avatar michaellenahan avatar sglyon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

atom-date's Issues

Allow custom datetime format

I'd like to be able to specify a datetime format other than <DATE> <TIME>, but e.g. <DATE>T<TIME> (aka EDTF). I guess a separate format field for datetime would do the trick.

Package.getActivationCommands is deprecated.

Use activationCommands instead of activationEvents in your package.json
Commands should be grouped by selector as follows:

  "activationCommands": {
    "atom-workspace": ["foo:bar", "foo:baz"],
    "atom-text-editor": ["foo:quux"]
  }
Package.getActivationCommands (C:\Users\Mateusz\AppData\Local\atom\app-0.201.0\resources\app.asar\src\package.js:808:9)
Package.hasActivationCommands (C:\Users\Mateusz\AppData\Local\atom\app-0.201.0\resources\app.asar\src\package.js:733:20)
<unknown> (C:\Users\Mateusz\AppData\Local\atom\app-0.201.0\resources\app.asar\src\package.js:185:24)
Package.measure (C:\Users\Mateusz\AppData\Local\atom\app-0.201.0\resources\app.asar\src\package.js:163:15)
Package.load (C:\Users\Mateusz\AppData\Local\atom\app-0.201.0\resources\app.asar\src\package.js:177:12)
PackageManager.loadPackage (C:\Users\Mateusz\AppData\Local\atom\app-0.201.0\resources\app.asar\src\package-manager.js:355:14)

Default format for "Date Time Format" not used.

The settings for "Date Time Format" reads... "If left blank, this will default to Date Format + Time Format". However, it is not and another format is used.

For example, given the following:
Date Format = [blank] (therefore DD-MM-YYYY)
Time Format = [blank] (therefore HH:mm)
We expect the Date Time Format to be generated as DD-MM-YYYY HH:mm.
However, it is not. Another format is used.

For example, the following is generated: "2017-12-06T08:43:28.802-07:00"
But, it should be generated as: "06-12-2017 08:43"

The work-around is to explicitly set Date Time Format to "DD-MM-YYYY HH:mm"
(For interest, it is not possible to set Date Format or Time Format to its "default value")

Btw, thanks for creating this package!

Snippets

Is it possible to have a snippet that (among other things) inserts the current date/time?

Custom date format broken after latest update

I have the following custom date format:

+------------------+
| YYYY-MM-DD (DDD) |
+------------------+

Before I updated to version 2.0.0 this resulted in dates that looked like:

+------------------+
| 2017-08-30 (Wed) |
+------------------+

After the update, the same formatter spits out:

+------------------+| 2017-09-20 (263) |+------------------+

Add timezone?

Hi! is it feasible to add timezones as a format option? I'd love to be able to insert a full ISO8601 date string including the timezone into my work.

Thanks!

Uncaught TypeError: Cannot read property '0' of undefined

[Enter steps to reproduce below:]

  1. ...just tried using the package and exception appreared.
  2. ...

Atom Version: 1.1.0
System: Microsoft Windows 7 Home Premium
Thrown From: date package, v1.1.0

Stack Trace

Uncaught TypeError: Cannot read property '0' of undefined

At C:\Users\ngunyi\.atom\packages\date\node_modules\date-utils\lib\date-utils.js:1429

TypeError: Cannot read property '0' of undefined
  at toFormat (C:\Users\ngunyi\.atom\packages\date\node_modules\date-utils\lib\date-utils.js:1429:53)
  at Date.toFormat (C:\Users\ngunyi\.atom\packages\date\node_modules\date-utils\lib\date-utils.js:1360:16)
  at get (C:\Users\ngunyi\.atom\packages\date\lib\date.js:34:20)
  at atom-text-editor.dateDate (C:\Users\ngunyi\.atom\packages\date\lib\date.js:9:12)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\ngunyi\AppData\Local\atom\app-1.1.0\resources\app.asar\src\command-registry.js:243:29)
  at C:\Users\ngunyi\AppData\Local\atom\app-1.1.0\resources\app.asar\src\command-registry.js:3:61
  at CommandPaletteView.module.exports.CommandPaletteView.confirmed (C:\Users\ngunyi\AppData\Local\atom\app-1.1.0\resources\app.asar\node_modules\command-palette\lib\command-palette-view.js:159:32)
  at CommandPaletteView.module.exports.SelectListView.confirmSelection (C:\Users\ngunyi\AppData\Local\atom\app-1.1.0\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:338:21)
  at space-pen-li.<anonymous> (C:\Users\ngunyi\AppData\Local\atom\app-1.1.0\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:139:19)
  at HTMLOListElement.jQuery.event.dispatch (C:\Users\ngunyi\AppData\Local\atom\app-1.1.0\resources\app.asar\node_modules\jquery\dist\jquery.js:4435:9)
  at HTMLOListElement.elemData.handle (C:\Users\ngunyi\AppData\Local\atom\app-1.1.0\resources\app.asar\node_modules\jquery\dist\jquery.js:4121:28)

Commands

 19x -4:35.5.0 core:delete (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -4:30.3.0 autocomplete-plus:confirm (atom-text-editor.editor.vim-mode.insert-mode.is-focused.autocomplete-active)
     -4:29.5.0 editor:newline (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
 17x -4:28.7.0 core:backspace (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -3:48.3.0 command-palette:toggle (atom-text-editor.editor.vim-mode.insert-mode.autocomplete-active.is-focused)
     -3:47 application:minimize (atom-text-editor.editor.vim-mode.insert-mode.autocomplete-active)
     -3:42.4.0 command-palette:toggle (atom-text-editor.editor.vim-mode.insert-mode.autocomplete-active.is-focused)
  6x -3:39.9.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -3:34 date:date (atom-text-editor.editor.vim-mode.insert-mode.autocomplete-active)
  2x -3:03.2.0 command-palette:toggle (ul.list-inline.tab-bar.inset-panel)
     -2:51.5.0 date:date (atom-text-editor.editor.vim-mode.insert-mode.autocomplete-active)
 17x -2:03.3.0 core:backspace (atom-text-editor.editor.vim-mode.insert-mode.autocomplete-active.is-focused)
     -2:00.5.0 command-palette:toggle (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -1:55.5.0 date:time (atom-text-editor.editor.vim-mode.insert-mode)
     -0:25.4.0 command-palette:toggle (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -0:15.6.0 date:date (atom-text-editor.editor.vim-mode.insert-mode)

Config

{
  "core": {
    "disabledPackages": [
      "vim-mode-plus"
    ]
  }
}

Installed Packages

# User
date, v1.1.0
markdown-table-formatter, v2.5.4
markdown-writer, v2.0.1
vim-mode, v0.62.0

# Dev
No dev packages

Improve instruction how to add keymap

I tried to add a keybinding for date:time but it doesn't work. My guess is that this is the case since it is rather unclear to what piece of atom it should be related.

I tried:
'atom-date': 'ctrl-alt-t': 'date:time'

as well as:
'date': 'ctrl-alt-t': 'date:time'

Both don't work.

Thanks in advance

Change timezone

I need to change the timezone to UTC, however I see no documentation for this.

New line in the Date/Time Format

I'd like to be able to define a Format like this:

  HH24:MI\n

... so that it inserts a new line after the time stamp. Currently it escapes "\n" prior to inserting. Any way to achieve that? Thanks!

Enabling shortcut

I am new to Atom, can you tell what i need to add to keymap.cson, so i can have date and time inserted with shortcut ?

Lets say i want to insert Data and Time when i press key CTRL+M

Or it can be CTRL+; like in google sheet

Package.activateConfig is deprecated.

Use a config schema instead. See the configuration section
of https://atom.io/docs/latest/hacking-atom-package-word-count and
https://atom.io/docs/api/latest/Config for more details

Package.activateConfig (C:\Users\Mateusz\AppData\Local\atom\app-0.205.0\resources\app.asar\src\package.js:263:11)
PackageDetailView.activate (C:\Users\Mateusz\AppData\Local\atom\app-0.205.0\resources\app.asar\node_modules\settings-view\lib\package-detail-view.js:163:26)
PackageDetailView.initialize (C:\Users\Mateusz\AppData\Local\atom\app-0.205.0\resources\app.asar\node_modules\settings-view\lib\package-detail-view.js:146:12)
PackageDetailView.View (C:\Users\Mateusz\AppData\Local\atom\app-0.205.0\resources\app.asar\node_modules\atom-space-pen-views\node_modules\space-pen\lib\space-pen.js:184:25)
new PackageDetailView (C:\Users\Mateusz\AppData\Local\atom\app-0.205.0\resources\app.asar\node_modules\settings-view\lib\package-detail-view.js:38:54)
<unknown> (C:\Users\Mateusz\AppData\Local\atom\app-0.205.0\resources\app.asar\node_modules\settings-view\lib\settings-view.js:255:22)

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/usr/share/atom/resources/app/src/atom.js:54:11)
Object.activate (/home/michael/.atom/packages/date/lib/date.js:7:9)

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.