forked from github/plane
style: new cycle list (#374)
* feat: short date helper function * feat: linear progress indicator added * style: new cyce list and cycle card design * feat: short date function improve * feat: linear progress indicator improvement * style: cycle card and progress indicator * fix: helper date function and progress indicator fix * fix: build error --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
This commit is contained in:
committed by
GitHub
parent
fef72ccc70
commit
786816ed41
@@ -101,4 +101,12 @@ export const getDateRangeStatus = (startDate: string , endDate: string ) => {
|
||||
} else {
|
||||
return "upcoming";
|
||||
}
|
||||
}
|
||||
|
||||
export const renderShortDateWithYearFormat = (date: Date) => {
|
||||
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
const day = date.getDate();
|
||||
const month = months[date.getMonth()];
|
||||
const year = date.getFullYear();
|
||||
return isNaN(date.getTime()) ? "N/A" : ` ${month} ${day}, ${year}`;
|
||||
}
|
||||
Reference in New Issue
Block a user