convert24To12

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.time

Convert a 24 hours time to a 12 hours time format

Params

  1. time*-String

    The 24 hours time like “23:00”

Return

  1. -String

    The 12 hours time like “11:00pm”

Example

import { convert24To12 } from '@blackbyte/sugar/time'
convert24To12('23:12') // => '11:12pm'

Todo

  • testsnormal