extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Add timestamps extension

Open kaiguang opened this issue 1 year ago • 2 comments

Description

Screencast

Checklist

kaiguang avatar Apr 06 '24 15:04 kaiguang

Congratulations on your new Raycast extension! :rocket:

We will aim to make the initial review within five working days. Once the PR is approved and merged, the extension will be available on our Store.

raycastbot avatar Apr 06 '24 15:04 raycastbot

Hi @pernielsentikaer, thanks for showing me the built-in timestamp features. Unfortunately there are some subtle differences between the extension in this PR and the built-in timestamp helpers:

  1. I want the timestamps to be in milliseconds, the built-in is only in seconds.
  2. I want the extension to insert the current timestamp directly to where the cursor is, the built-in only copies it to the clipboard
  3. When converting a timestamp to date, I want to see the timezone in my locale, something like Thu Apr 11 2024 10:27:07 GMT-0600 (Mountain Daylight Saving Time), not the hard to read format like February 23, 56248 at 05:05:42 GMT-07:00 from the built-in
  4. When converting a timestamp to date, I want to insert the date directly to the cursor location, the built-in only copies it to the clipboard
  5. The built-in doesn't offer me to insert today's date in the format like 2024-04-11 Thu

kaiguang avatar Apr 11 '24 16:04 kaiguang

There is already a lot of extensions doing date formatting in the store, maybe it would be better to enhance one of them if the feature is not already present - most of the things can be done with snippets too

  1. You can setup a snippet with this content {date format="A"} - that should give you time in milliseconds
  2. With the snippet it's possible to expand with a keyword like !ms
  3. A snippet with {date format="yyyy-MM-dd E"} should give you this output

pernielsentikaer avatar Apr 16 '24 07:04 pernielsentikaer