Skip to content

Commit 0ee01bc

Browse files
committed
fix(@axhxrx/date): fix slow types in public API
1 parent 5249202 commit 0ee01bc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dateToFormat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type DateStringFormat =
1313
/**
1414
Returns a string expressing a date (the current date, unless otherwise specified) in a particular format.
1515
*/
16-
export const dateToFormat = (format: DateStringFormat, date?: Date) =>
16+
export const dateToFormat = (format: DateStringFormat, date?: Date): string =>
1717
{
1818
const fullDateString = dateToIS08601WithTimeZoneOffset(date);
1919
const [dateString, timeString] = fullDateString.split('T');

dateToIS08601WithTimeZoneOffset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
export const dateToIS08601WithTimeZoneOffset = (
1010
date: Date = new Date(),
1111
timeZoneOffset?: number,
12-
) =>
12+
): string =>
1313
{
1414
// We can't do better than this in JS, if we don't want to throw an error...
1515
if (isNaN(date.getTime())) {

0 commit comments

Comments
 (0)