How to use the quasar-framework/src/utils/is.js.isString function in quasar-framework

To help you get started, we’ve selected a few quasar-framework examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Saeid-Khaleghi / QJDatetime / src / date.js View on Github external
export function setupDateForPersianDate (date) {
  if (isString(date)) {
    let dd = date.substring(0, 19).replace('T', ' ')
    if (rePersianDateTimeStr.exec(dd) !== null) {
      let datetime = dd.replace(rePersianDateTimeStr, function (match, text) {
        return match.split('-').join('/')
      }).substring(0, 19).split(' ')
      datetime[1] = (typeof datetime[1] !== 'undefined') ? datetime[1] : '00:00:00'
      date = datetime[0].split('/').concat(datetime[1].split(':')).map(Number)
    }
  }
  return date
}