https://github.com/njbrown/fast-time-input
Time input shortcuts
https://github.com/njbrown/fast-time-input
datetime javascript js react shortcode shortcut
Last synced: 3 months ago
JSON representation
Time input shortcuts
- Host: GitHub
- URL: https://github.com/njbrown/fast-time-input
- Owner: njbrown
- License: mit
- Created: 2019-04-22T06:17:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-23T16:19:40.000Z (8 months ago)
- Last Synced: 2024-10-23T22:35:20.592Z (8 months ago)
- Topics: datetime, javascript, js, react, shortcode, shortcut
- Language: TypeScript
- Size: 202 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fast Time Input
---
[](https://www.npmjs.com/package/fast-time-input)
[](https://www.npmjs.com/package/fast-time-input)

[](https://renovatebot.com/)---
Shortcodes for time input
---
Save time inputting dates by writing shortcut values and have them converted to time strings e.g. `130p => 01:30 PM`. It makes entering large amount of date entries really fast.
### List of features
- Converts shortcode times to time strings
- Displays time in 12 and 24 hours
- Specify AM `a` or `am` or PM using `p` or `pm`, defaults to AM e.g. `545p => 05:45 PM` and `220a => 2:20a`### Installation
```shell
$ npm install --save fast-time-input
```or
```shell
$ yarn add fast-time-input
```### Examples Conversions
Single and double digits
```
1p => 1:00 PM
12p => 12:00 PM
13pm => 1:00 PM
```Triple digits
```
130 => 1:30
125 => 1:25
```Quadruple Digits
```
0530 => 5:30
1555 => 15:55
```### Code Demo
```js
import { parse } "fast-time-input";
result = parse("130p");
consle.log(result); // => prints "01:30 PM"
```### Contributing
If you find any bugs or issues let me know.
### License
This project is licensed under the MIT License