Convert to Seconds (convert-to-sec)
A simple Visual Studio Code extension that converts custom time units into seconds.
✨ Features
Type a token followed by = and it will be automatically converted into seconds:
mis= → minutes in s (1mis = 60 )
his= → hours in s (1his = 3600 )
dis= → days in s (1dis = 86400 )
wis= → weeks in s (1wis = 604800 )
mois= → months in s (30-day reference: 1mois = 2592000 )
yis= → years in s (1yis = 31536000 )
You can also prefix with a number:
⌨️ Usage
- Type a token like
5mis= in your editor.
- As soon as you type the
= , the token is replaced with its seconds equivalent.
⚡ No command palette or keyboard shortcut required.
📦 Installation
- Download it from the Visual Studio Code Marketplace (once published).
- Or install manually from a
.vsix file:
code --install-extension convert-to-sec-0.0.1.vsix
🛠 Development
- Clone the repository.
- Install dependencies:
npm install
- Build:
npm run compile
- Open the folder in VS Code and press
F5 to run the Extension Development Host for debugging.
📝 License
MIT License
| |