convert12To24

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

Convert a 12 hours time to a 24 hours time

Params

  1. time*-String|Number

    The 12 hours time to convert formatted like “12pm” or “12:30am”

Return

  1. -String

    The 24 hours time like “23:00”

Example

import { convert12To24 } from '@blackbyte/sugar/time'
convert12To24('12pm') // => '12:00'

Todo

  • testsnormal