Add timestamps extension
Description
Screencast
Checklist
- [x] I read the extension guidelines
- [x] I read the documentation about publishing
- [x] I ran
npm run buildand tested this distribution build in Raycast - [x] I checked that files in the
assetsfolder are used by the extension itself - [x] I checked that assets used by the
READMEare placed outside of themetadatafolder
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.
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:
- I want the timestamps to be in milliseconds, the built-in is only in seconds.
- I want the extension to insert the current timestamp directly to where the cursor is, the built-in only copies it to the clipboard
- 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 likeFebruary 23, 56248 at 05:05:42 GMT-07:00from the built-in - 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
- The built-in doesn't offer me to insert today's date in the format like
2024-04-11 Thu
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
- You can setup a snippet with this content
{date format="A"}- that should give you time in milliseconds - With the snippet it's possible to expand with a keyword like
!ms - A snippet with
{date format="yyyy-MM-dd E"}should give you this output