Skip to content

Commit

Permalink
Add commented imports to temporal-polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
meduzen committed Apr 19, 2024
1 parent 8d6475c commit 783729c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/temporal/datetime.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { p } from './utils/string.js'
import { tzOffset } from './timezone.js'
import { config } from './config/datetime'
import { Temporal, toTemporalInstant } from '@js-temporal/polyfill'
// import { Temporal, toTemporalInstant } from 'temporal-polyfill'

Date.prototype.toTemporalInstant = toTemporalInstant

Expand Down
1 change: 1 addition & 0 deletions src/temporal/duration.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

// Date.prototype.toTemporalInstant = toTemporalInstant
import { Temporal } from '@js-temporal/polyfill'
// import { Temporal } from 'temporal-polyfill'
import { round } from './utils/math'

/**
Expand Down
1 change: 1 addition & 0 deletions src/temporal/timezone.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { p } from './utils/string.js'
import { tzConfig } from './config/tz.js'

import { Temporal, toTemporalInstant } from '@js-temporal/polyfill'
// import { Temporal, toTemporalInstant } from 'temporal-polyfill'

Date.prototype.toTemporalInstant = toTemporalInstant

Expand Down
1 change: 1 addition & 0 deletions src/temporal/utils/temporal.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Temporal } from '@js-temporal/polyfill'
// import { Temporal } from 'temporal-polyfill'

export const dateToPlainDate = d => new Temporal.PlainDate(d.getFullYear(), d.getMonth() + 1, d.getDate())

0 comments on commit 783729c

Please sign in to comment.