Travis build: 1506

This commit is contained in:
30secondsofcode
2018-02-02 11:05:56 +00:00
parent 1965d15bb8
commit e7007e4e05
4 changed files with 70 additions and 3 deletions

View File

@ -5,7 +5,10 @@ Converts an integer to a suffixed string, adding `am` or `pm` based on its value
Use the modulo operator (`%`) and conditional checks to transform an integer to a stringified 12-hour format with meridiem suffix.
```js
const getMeridiemSuffixOfInteger = num => num === 0 || num === 24 ? 12 + "am" : num === 12 ? 12 + "pm" : num < 12 ? (num % 12) + "am" : (num % 12) + "pm";
const getMeridiemSuffixOfInteger = num =>
num === 0 || num === 24
? 12 + 'am'
: num === 12 ? 12 + 'pm' : num < 12 ? num % 12 + 'am' : num % 12 + 'pm';
```
```js