Clean up. Almost ready to deploy maybe. REally wanna rewrite but hey eventually we will.
This commit is contained in:
@ -18,3 +18,19 @@ export const makeConditionalClassName = ({
|
||||
}) => {
|
||||
return defaultClassName + ' ' + (context ? on : off);
|
||||
};
|
||||
|
||||
export const formatTime = (timestamp: string) => {
|
||||
const date = new Date(timestamp);
|
||||
const time = date.toLocaleTimeString('en-US', {
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
});
|
||||
return time;
|
||||
};
|
||||
|
||||
export const formatDate = (timestamp: string) => {
|
||||
const date = new Date(timestamp);
|
||||
const day = date.getDate();
|
||||
const month = date.toLocaleString('default', { month: 'long' });
|
||||
return `${month} ${day}`;
|
||||
};
|
||||
|
Reference in New Issue
Block a user