Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/add.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { curry } from './curry'
import { parseNumber, parseDate } from './parse'
import { UnitOfTime, unitsOfTime, millisecondsPer } from './unit-of-time'
import { curry } from './curry.js'
import { parseNumber, parseDate } from './parse.js'
import { UnitOfTime, unitsOfTime, millisecondsPer } from './unit-of-time.js'

/**
* Returns `NaN` when `date` is in the last-representable month,
Expand Down
2 changes: 1 addition & 1 deletion src/date-descriptor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { has } from './parse'
import { has } from './parse.js'

export type DateDescriptor =
| { year: number }
Expand Down
8 changes: 4 additions & 4 deletions src/distance.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { get } from './get'
import { curry } from './curry'
import { parseDate } from './parse'
import { UnitOfTime, unitsOfTime, millisecondsPer } from './unit-of-time'
import { get } from './get.js'
import { curry } from './curry.js'
import { parseDate } from './parse.js'
import { UnitOfTime, unitsOfTime, millisecondsPer } from './unit-of-time.js'

export const distance = curry(function distance(
unit: UnitOfTime,
Expand Down
6 changes: 3 additions & 3 deletions src/get.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { curry } from './curry'
import { parseDate } from './parse'
import { AccessibleUnitOfTime, accessibleUnitsOfTime } from './unit-of-time'
import { curry } from './curry.js'
import { parseDate } from './parse.js'
import { AccessibleUnitOfTime, accessibleUnitsOfTime } from './unit-of-time.js'

export const get = curry(function get(
unit: AccessibleUnitOfTime,
Expand Down
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* Oh dear, another date library
*/

import { of } from './of'
import { get } from './get'
import { add } from './add'
import { subtract } from './subtract'
import { startOf } from './start-of'
import { distance } from './distance'
import { of } from './of.js'
import { get } from './get.js'
import { add } from './add.js'
import { subtract } from './subtract.js'
import { startOf } from './start-of.js'
import { distance } from './distance.js'

type D = {
of: typeof of
Expand Down
2 changes: 1 addition & 1 deletion src/of.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
dateStringAsDate,
DateDescriptor,
isDateDescriptor,
} from './date-descriptor'
} from './date-descriptor.js'

export function isDatestringInFormatISO(datestring: string): boolean {
return /^[-+]?(?:\d{2})?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/.test(datestring)
Expand Down
6 changes: 3 additions & 3 deletions src/start-of.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { curry } from './curry'
import { parseDate } from './parse'
import { ResetableUnitOfTime, resetableUnitsOfTime } from './unit-of-time'
import { curry } from './curry.js'
import { parseDate } from './parse.js'
import { ResetableUnitOfTime, resetableUnitsOfTime } from './unit-of-time.js'

export const startOf = curry(function startOf(
unit: ResetableUnitOfTime,
Expand Down
6 changes: 3 additions & 3 deletions src/subtract.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { add } from './add'
import { curry } from './curry'
import { UnitOfTime } from './unit-of-time'
import { add } from './add.js'
import { curry } from './curry.js'
import { UnitOfTime } from './unit-of-time.js'

export const subtract = curry(function subtract(
unit: UnitOfTime,
Expand Down