parseSecondFromTime
Signature
Section titled “Signature”parseSecondFromTime(value: string): stringimport { parseSecondFromTime } from "@northguild/gmt/plain/parse";Return the second (0-59) for a given ISO 8601 time string.
- Returns zero-padded string for second.
- Returns “” for invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value |
string |
ISO time string |
Returns
Section titled “Returns”Second (00-59) or “” on invalid input
Examples
Section titled “Examples”parseSecondFromTime("12:30:45") // "45"parseSecondFromTime("12:00:00") // "00"parseSecondFromTime("invalid") // ""