Skip to content
A helper function to convert 24 hours to 12 hours with AM/PM
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.npmrc
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

to12Hours Build Status

Convert 24 hour format to 12 hours.

Install

$ npm install to12hours

Usage

const to12Hours = require('to12hours');

to12Hours('15:35');
//=> '3:35PM'

API

to12Hours(input, options?)

input

Type: string

The time in the 24-hour format.

You can’t perform that action at this time.