Rocky_Mountain_Vending/.pnpm-store/v10/files/d3/24a7c671f0286a0599e3b8a64fd7443f4b86547e6f762c083980e9aad086838f877d2b672fdd1b54fcda3f706760bb9adbc76c99ab5d82822a14e8c9de7012
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

37 lines
1 KiB
Text

import { startOfMinute } from "./startOfMinute.js";
/**
* @name isSameMinute
* @category Minute Helpers
* @summary Are the given dates in the same minute (and hour and day)?
*
* @description
* Are the given dates in the same minute (and hour and day)?
*
* @param laterDate - The first date to check
* @param earlierDate - The second date to check
*
* @returns The dates are in the same minute (and hour and day)
*
* @example
* // Are 4 September 2014 06:30:00 and 4 September 2014 06:30:15 in the same minute?
* const result = isSameMinute(
* new Date(2014, 8, 4, 6, 30),
* new Date(2014, 8, 4, 6, 30, 15)
* )
* //=> true
*
* @example
* // Are 4 September 2014 06:30:00 and 5 September 2014 06:30:00 in the same minute?
* const result = isSameMinute(
* new Date(2014, 8, 4, 6, 30),
* new Date(2014, 8, 5, 6, 30)
* )
* //=> false
*/
export function isSameMinute(laterDate, earlierDate) {
return +startOfMinute(laterDate) === +startOfMinute(earlierDate);
}
// Fallback for modularized imports:
export default isSameMinute;