@@ -181,11 +181,11 @@ describe('getXAxisformat', () => {
181181 } ) ;
182182
183183 it ( 'should format daily dates correctly' , ( ) => {
184- expect ( getXAxisformat ( '2025-03-01' , 'daily' ) ) . toMatch ( / M a r \d { 1 , 2 } , \d { 2 } / ) ;
184+ expect ( getXAxisformat ( '2025-03-01' , 'daily' ) ) . toMatch ( / M a r \d { 1 , 2 } , \d { 4 } / ) ;
185185 } ) ;
186186
187187 it ( 'should format weekly dates correctly' , ( ) => {
188- expect ( getXAxisformat ( '2025-03-02' , 'daily' ) ) . toMatch ( / M a r \d { 1 , 2 } , \d { 2 } / ) ;
188+ expect ( getXAxisformat ( '2025-03-02' , 'daily' ) ) . toMatch ( / M a r \d { 1 , 2 } , \d { 4 } / ) ;
189189 } ) ;
190190
191191 it ( 'should format monthly dates correctly' , ( ) => {
@@ -199,12 +199,12 @@ describe('getXAxisformat', () => {
199199 // Test cases for the +00 timezone format fix
200200 it ( 'should handle +00 timezone format correctly for daily grouping' , ( ) => {
201201 const result = getXAxisformat ( '2025-09-29T00:00:00+00' , 'daily' ) ;
202- expect ( result ) . toMatch ( / S e p \d { 1 , 2 } , \d { 2 } / ) ;
202+ expect ( result ) . toMatch ( / S e p \d { 1 , 2 } , \d { 4 } / ) ;
203203 } ) ;
204204
205205 it ( 'should handle +00 timezone format correctly for weekly grouping' , ( ) => {
206206 const result = getXAxisformat ( '2025-09-29T00:00:00+00' , 'weekly' ) ;
207- expect ( result ) . toMatch ( / S e p \d { 1 , 2 } , \d { 2 } / ) ;
207+ expect ( result ) . toMatch ( / S e p \d { 1 , 2 } , \d { 4 } / ) ;
208208 } ) ;
209209
210210 it ( 'should handle +00 timezone format correctly for monthly grouping' , ( ) => {
@@ -219,7 +219,7 @@ describe('getXAxisformat', () => {
219219
220220 it ( 'should handle Z timezone format (should still work)' , ( ) => {
221221 const result = getXAxisformat ( '2025-10-01T03:43:36.535Z' , 'daily' ) ;
222- expect ( result ) . toMatch ( / O c t \d { 1 , 2 } , \d { 2 } / ) ;
222+ expect ( result ) . toMatch ( / O c t \d { 1 , 2 } , \d { 4 } / ) ;
223223 } ) ;
224224} ) ;
225225
@@ -236,14 +236,14 @@ describe('getLastUsedDay', () => {
236236
237237 it ( 'should return formatted date for older dates' , ( ) => {
238238 expect ( getLastUsedDay ( '2025-02-15T00:00:00Z' ) ) . toMatch (
239- / F e b \d { 1 , 2 } , \d { 2 } / ,
239+ / F e b \d { 1 , 2 } , \d { 4 } / ,
240240 ) ;
241241 } ) ;
242242
243243 // Test cases for the +00 timezone format fix
244244 it ( 'should handle +00 timezone format correctly for older dates' , ( ) => {
245245 const result = getLastUsedDay ( '2025-02-15T00:00:00+00' ) ;
246- expect ( result ) . toMatch ( / F e b \d { 1 , 2 } , \d { 2 } / ) ;
246+ expect ( result ) . toMatch ( / F e b \d { 1 , 2 } , \d { 4 } / ) ;
247247 } ) ;
248248
249249 it ( 'should handle +00 timezone format correctly for recent dates' , ( ) => {
@@ -253,13 +253,13 @@ describe('getLastUsedDay', () => {
253253 const pastDateString = pastDate . toISOString ( ) . replace ( 'Z' , '+00' ) ;
254254
255255 const result = getLastUsedDay ( pastDateString ) ;
256- expect ( result ) . toMatch ( / \w { 3 } \d { 1 , 2 } , \d { 2 } / ) ;
256+ expect ( result ) . toMatch ( / \w { 3 } \d { 1 , 2 } , \d { 4 } / ) ;
257257 } ) ;
258258
259259 it ( 'should handle Z timezone format (should still work)' , ( ) => {
260260 // Use a date that's definitely in the past to avoid "Today" logic
261261 const result = getLastUsedDay ( '2025-02-15T03:43:36.535Z' ) ;
262- expect ( result ) . toMatch ( / F e b \d { 1 , 2 } , \d { 2 } / ) ;
262+ expect ( result ) . toMatch ( / F e b \d { 1 , 2 } , \d { 4 } / ) ;
263263 } ) ;
264264} ) ;
265265
0 commit comments