12to24 中文文档教程
Usage
12 to 24
const {formatTime} = require('12to24');
formatTime('10-15'); //10:15
formatTime('10-15 PM'); //22:15
formatTime('10 15 pm'); //22:15
formatTime('12 00 am'); //00:00
24 to 12
const {formatTime} = require('12to24');
formatTime('22 15',{to12:true}); //10:15 PM
formatTime('24 00',{to12:true}); //12:00 PM
formatTime('10-15',{to12:true}); //10:15 AM
formatTime('11:45 pm',{to12:true}); //11:45 PM
Installation
npm i --save 12to24
Usage
12 to 24
const {formatTime} = require('12to24');
formatTime('10-15'); //10:15
formatTime('10-15 PM'); //22:15
formatTime('10 15 pm'); //22:15
formatTime('12 00 am'); //00:00
24 to 12
const {formatTime} = require('12to24');
formatTime('22 15',{to12:true}); //10:15 PM
formatTime('24 00',{to12:true}); //12:00 PM
formatTime('10-15',{to12:true}); //10:15 AM
formatTime('11:45 pm',{to12:true}); //11:45 PM
Installation
npm i --save 12to24
更多
你可能也喜欢
- @00a/util.os 中文文档教程
- @0xsequence/transactions 中文文档教程
- @11tyrocks/eleventy-plugin-social-images 中文文档教程
- @17media/node-logger 中文文档教程
- @1o1w1/react-scripts 中文文档教程
- @8bitago/tiny-module 中文文档教程
- @a-a-game-studio/aa-core 中文文档教程
- @a11ycore/utils 中文文档教程
- @aaronpowell/graphql-cosmosdb-subscriptions 中文文档教程
- @abext/reactions 中文文档教程