From ff4401934cfb13dce6971c9f258e93123cc76fc0 Mon Sep 17 00:00:00 2001 From: ztimson Date: Sat, 16 Nov 2024 11:02:32 -0500 Subject: [PATCH] Fixed formatDate month shortform --- package.json | 2 +- src/time.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fb1a859..2552b09 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/utils", - "version": "0.22.9", + "version": "0.22.10", "description": "Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/time.ts b/src/time.ts index 1d2f3db..d51b72c 100644 --- a/src/time.ts +++ b/src/time.ts @@ -100,7 +100,7 @@ export function formatDate(date: Date | number | string, format = 'YYYY-MM-DD H: .replaceAll('YY', date.getFullYear().toString().slice(2)) // Month .replaceAll('MMMM', month(date.getMonth())) - .replaceAll('MMM', month(date.getMonth()).slice(0, 2)) + .replaceAll('MMM', month(date.getMonth()).slice(0, 3)) .replaceAll('MM', (date.getMonth() + 1).toString().padStart(2, '0')) .replaceAll('M', (date.getMonth() + 1).toString()) // Day