Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
No EOL
756 B
Text
19 lines
No EOL
756 B
Text
import { defaultDateLib } from "../classes/DateLib.js";
|
|
/**
|
|
* Formats the week number.
|
|
*
|
|
* @defaultValue The week number as a string, with a leading zero for single-digit numbers.
|
|
* @param weekNumber The week number to format.
|
|
* @param dateLib The date library to use for formatting. Defaults to
|
|
* `defaultDateLib`.
|
|
* @returns The formatted week number as a string.
|
|
* @group Formatters
|
|
* @see https://daypicker.dev/docs/translation#custom-formatters
|
|
*/
|
|
export function formatWeekNumber(weekNumber, dateLib = defaultDateLib) {
|
|
if (weekNumber < 10) {
|
|
return dateLib.formatNumber(`0${weekNumber.toLocaleString()}`);
|
|
}
|
|
return dateLib.formatNumber(`${weekNumber.toLocaleString()}`);
|
|
}
|
|
//# sourceMappingURL=formatWeekNumber.js.map |