Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit e6159ba

Browse files
committed
fix: format plural/singular "week"
1 parent 98803eb commit e6159ba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/utils/format.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,14 @@ export const formatPageTitle = (pageTitle) => {
211211
*/
212212
export const formatJobDate = (startDate, duration) => {
213213
const dateStr = startDate ? moment(startDate).format(DAY_FORMAT) : "";
214+
214215
if (startDate && duration) {
215-
return `Requested starting ${dateStr} for ${duration} weeks`;
216+
return `Requested starting ${dateStr} for ${formatPlural(duration, "week")}`;
216217
} else if (startDate) {
217218
return `Requested starting ${dateStr}`;
218219
} else if (duration) {
219-
return `${duration} weeks`;
220+
return formatPlural(duration, "week");
220221
}
221-
return "";
222+
223+
return "TBD";
222224
};

0 commit comments

Comments
 (0)