mirror of
https://github.com/web3privacy/explorer-app.git
synced 2024-10-15 16:46:26 +02:00
10 lines
270 B
TypeScript
10 lines
270 B
TypeScript
import moment from 'moment'
|
|
|
|
export function formatDate(date: Date | string) {
|
|
return moment(date).format('MM / YYYY')
|
|
}
|
|
|
|
export function capitalize(word: string): string {
|
|
if (!word) return word
|
|
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
|
|
}
|