11 lines
564 B
JavaScript
11 lines
564 B
JavaScript
export function isoDate(date=Date.now()){
|
|
return new Date().toISOString().split('T')[0]
|
|
}
|
|
|
|
export function removeUrls(string) {
|
|
return string.replace(/(https:\/\/www\.|http:\/\/www\.|https:\/\/|http:\/\/)?[a-zA-Z]{2,}(\.[a-zA-Z]{2,})(\.[a-zA-Z]{2,})?\/[a-zA-Z0-9]{2,}|((https:\/\/www\.|http:\/\/www\.|https:\/\/|http:\/\/)?[a-zA-Z]{2,}(\.[a-zA-Z]{2,})(\.[a-zA-Z]{2,})?)|(https:\/\/www\.|http:\/\/www\.|https:\/\/|http:\/\/)?[a-zA-Z0-9]{2,}\.[a-zA-Z0-9]{2,}\.[a-zA-Z0-9]{2,}(\.[a-zA-Z0-9]{2,})?/g, '')
|
|
}
|
|
|
|
export function timestamp(){
|
|
return Date.now()
|
|
} |