import { CustomAPIFieldValue } from '../types' ; export const getAsLocalDateTimeString = ( maybeDate ) => { if ( typeof maybeDate !== 'string' ) return null ; const dateValue = Date . parse ( maybeDate ) ; return dateValue ? new Date ( dateValue ) . toLocaleString ( ) : null ; } ;