Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Converts a date format, such as "*iso", "*mdy", "*ymd", or "*usa" to a pattern, such as "YYYY-MM-DD", "MM/DD/YY", "YY/MM/DD", or "MM/DD/YYYY".

Parameters

  1. Date format
  2. Separator (for example "/" or "-")
  3. Century (optional) - used to prepend to the pattern for "*cymd", "*cmdy", and "*cdmy" formats

Return value

String pattern

Example

console.log(pjs.getDatePattern("*mdy", "/"));  // outputs MM/DD/YY
  • No labels