Travis build: 1854

This commit is contained in:
30secondsofcode
2020-04-04 13:57:32 +00:00
parent 439b79832a
commit 09a8ba5219
12 changed files with 87 additions and 95 deletions

View File

@ -8,15 +8,14 @@ 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';
? 12 + 'pm'
: num < 12
? (num % 12) + 'am'
: (num % 12) + 'pm';
```
```js