Skip to content

Commit 1335aa5

Browse files
committed
feat: Branding ISO 8601 Month
1 parent 8e13962 commit 1335aa5

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎packages/js-lib/src/datetime/localDate.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test('basic', () => {
2626
expect(ld.day).toBe(21)
2727
expect(ld.month).toBe(6)
2828
expect(ld.year).toBe(1984)
29-
expect(ld.toIsoMonth()).toBe('1984-06')
29+
expect(ld.toISOMonth()).toBe('1984-06')
3030
expect(ld.toDateObject()).toEqual({
3131
year: 1984,
3232
month: 6,

‎packages/js-lib/src/datetime/localDate.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ export class LocalDate {
479479
* Returns e.g: `1984-06`
480480
*/
481481
toISOMonth(): IsoMonth {
482-
return this.toISODate().slice(0, 7)
482+
return this.toISODate().slice(0, 7) as IsoMonth
483483
}
484484

485485
/**

‎packages/js-lib/src/datetime/localTime.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ test('basic', () => {
4949
expect(lt.valueOf()).toBe(1640995200)
5050
expect(lt.toJSON()).toBe(1640995200)
5151
}
52-
expect(lt.toIsoMonth()).toBe('2022-01')
52+
expect(lt.toISOMonth()).toBe('2022-01')
5353
const lt2 = lt.clone()
5454
expect(lt2).not.toBe(lt)
5555

‎packages/js-lib/src/datetime/localTime.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ export class LocalTime {
715715
* Returns e.g: `1984-06`
716716
*/
717717
toISOMonth(): IsoMonth {
718-
return this.toISODate().slice(0, 7)
718+
return this.toISODate().slice(0, 7) as IsoMonth
719719
}
720720

721721
/**

0 commit comments

Comments
 (0)