Check for date type - Fluid Topics - Latest

Fluid Topics Designer Guide

Category
Reference Guides
Audience
public
Version
Latest

The isDate() method returns if a specific metadata key is defined as a date.

For example:

const metadataKey = 'ft:lastPublication';
const isDate = FluidTopicsDateService.isDate(metadataKey);
console.log(`Is "${metadataKey}" a date?`, isDate);