mirror of
https://github.com/franjsco/tick3t
synced 2024-12-29 10:50:08 +01:00
feat: add helper module
This commit is contained in:
parent
c2bb646bcf
commit
2267747fcd
15
src/utils/helper.js
Normal file
15
src/utils/helper.js
Normal file
@ -0,0 +1,15 @@
|
||||
import moment from 'moment';
|
||||
|
||||
export const formatDate = (dateString) => {
|
||||
|
||||
if (dateString) {
|
||||
const date = moment(dateString);
|
||||
return date.format('DD-MM-YYYY HH:mm');
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
export const decode = (value) => {
|
||||
return value.replace(/_/g, " ");
|
||||
}
|
Loading…
Reference in New Issue
Block a user