pjs.getTimePattern()

pjs.getTimePattern()

Description

The pjs.getTimePattern() API converts a time format, such as *hms or *usa, to a pattern, such as HH:mm:ss or hh:mm A.

Parameters

  1. Time format - The time format to convert.

  2. Separator - The separator character to use in the pattern, for example : or ..

Return Value

The pattern, as a string.

Example

console.log(pjs.getTimePattern("*hms", ":")); // outputs HH:mm:ss

Related Pages