processTimestampToDate function
String
processTimestampToDate(
- dynamic timestampMixed,
- bool fullDatetime,
- String separator
)
Implementation
String processTimestampToDate(
dynamic timestampMixed,
bool fullDatetime,
String separator,
) {
if (tsUtDebug) {
logDebug(
'processTimestampToDate | timestampMixed: $timestampMixed, fullDatetime: $fullDatetime, separator: $separator',
);
}
if (timestampMixed is int || timestampMixed is double) {
if (timestampMixed == 0) {
timestampMixed = nowToTimestap();
}
timestampMixed = timestampMixed.toString();
} else if (timestampMixed is String) {
timestampMixed = fixDateWithTz(timestampMixed);
timestampMixed = dateToTimestap(timestampMixed);
}
return timestampToDate(
timestamp: timestampMixed,
fullDateTime: fullDatetime,
separator: separator,
);
}