Rocky_Mountain_Vending/.pnpm-store/v10/files/31/9147f483f4ac081cf8cd3d6c7abd5cf77977446f8af7d3f45c376cc2c7b6511780e48241fa1dcc1477dd359a73f6526df4387f76191b24fd0d51637a045487
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
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>
2026-02-12 16:22:15 -07:00

113 lines
3.7 KiB
Text

import type { DateArg, MaybeArray } from "./types.js";
/**
* The locale string (see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
* @deprecated
*
* [TODO] Remove in v4
*/
export type IntlFormatLocale = Intl.ResolvedDateTimeFormatOptions["locale"];
/**
* The format options (see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options)
*/
export type IntlFormatFormatOptions = Intl.DateTimeFormatOptions;
/**
* The locale options.
*/
export interface IntlFormatLocaleOptions {
/** The locales to use (see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument) */
locale: MaybeArray<Intl.ResolvedDateTimeFormatOptions["locale"]>;
}
/**
* @name intlFormat
* @category Common Helpers
* @summary Format the date with Intl.DateTimeFormat (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat).
*
* @description
* Return the formatted date string in the given format.
* The method uses [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) inside.
* formatOptions are the same as [`Intl.DateTimeFormat` options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options)
*
* > ⚠️ Please note that before Node version 13.0.0, only the locale data for en-US is available by default.
*
* @param date - The date to format
*
* @returns The formatted date string
*
* @throws `date` must not be Invalid Date
*
* @example
* // Represent 4 October 2019 in middle-endian format:
* const result = intlFormat(new Date(2019, 9, 4, 12, 30, 13, 456))
* //=> 10/4/2019
*/
export declare function intlFormat(date: DateArg<Date> & {}): string;
/**
* @param date - The date to format
* @param localeOptions - An object with locale
*
* @returns The formatted date string
*
* @throws `date` must not be Invalid Date
*
* @example
* // Represent 4 October 2019 in Korean.
* // Convert the date with locale's options.
* const result = intlFormat(new Date(2019, 9, 4, 12, 30, 13, 456), {
* locale: 'ko-KR',
* })
* //=> 2019. 10. 4.
*/
export declare function intlFormat(
date: DateArg<Date> & {},
localeOptions: IntlFormatLocaleOptions,
): string;
/**
* @param date - The date to format
* @param formatOptions - The format options
*
* @returns The formatted date string
*
* @throws `date` must not be Invalid Date
*
* @example
* // Represent 4 October 2019.
* // Convert the date with format's options.
* const result = intlFormat.default(new Date(2019, 9, 4, 12, 30, 13, 456), {
* year: 'numeric',
* month: 'numeric',
* day: 'numeric',
* hour: 'numeric',
* })
* //=> 10/4/2019, 12 PM
*/
export declare function intlFormat(
date: DateArg<Date> & {},
formatOptions: IntlFormatFormatOptions,
): string;
/**
* @param date - The date to format
* @param formatOptions - The format options
* @param localeOptions - An object with locale
*
* @returns The formatted date string
*
* @throws `date` must not be Invalid Date
*
* @example
* // Represent 4 October 2019 in German.
* // Convert the date with format's options and locale's options.
* const result = intlFormat(new Date(2019, 9, 4, 12, 30, 13, 456), {
* weekday: 'long',
* year: 'numeric',
* month: 'long',
* day: 'numeric',
* }, {
* locale: 'de-DE',
* })
* //=> Freitag, 4. Oktober 2019
*/
export declare function intlFormat(
date: DateArg<Date> & {},
formatOptions: IntlFormatFormatOptions,
localeOptions: IntlFormatLocaleOptions,
): string;