Skip to content

Commit b655ae7

Browse files
committed
Fixes typo refrenceDate --> referenceDate
1 parent c459f39 commit b655ae7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/datetime.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -745,10 +745,10 @@ export default class DateTime {
745745
* @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance
746746
* @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
747747
* @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
748-
* @param {DateTime|Date|Object} opts.refrenceDate - the reference date to take for missing parts
748+
* @param {DateTime|Date|Object} opts.referenceDate - the reference date to take for missing parts
749749
* @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'
750750
* @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'
751-
* @example DateTime.fromObject({ year: 1982 }, { refrenceDate: { day: 10 } }).toISODate() //=> '1982-01-10'
751+
* @example DateTime.fromObject({ year: 1982 }, { referenceDate: { day: 10 } }).toISODate() //=> '1982-01-10'
752752
* @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06
753753
* @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),
754754
* @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })
@@ -768,9 +768,9 @@ export default class DateTime {
768768
const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);
769769
const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, loc);
770770

771-
const tsNow = isUndefined(opts.refrenceDate)
772-
? friendlyDateTime(opts.refrenceDate).toUnixInteger()
773-
: opts.refrenceDate,
771+
const tsNow = isUndefined(opts.referenceDate)
772+
? friendlyDateTime(opts.referenceDate).toUnixInteger()
773+
: opts.referenceDate,
774774
offsetProvis = !isUndefined(opts.specificOffset)
775775
? opts.specificOffset
776776
: zoneToUse.offset(tsNow),

test/datetime/create.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,8 +883,8 @@ test("DateTime.fromObject takes a undefined to mean {}", () => {
883883
expect(res.year).toBe(new Date().getFullYear());
884884
});
885885

886-
test("DateTime.fromObject respects `refrenceDate`", () => {
887-
const res = DateTime.fromObject(undefined, { refrenceDate: { day: 10 } });
886+
test("DateTime.fromObject respects `referenceDate`", () => {
887+
const res = DateTime.fromObject(undefined, { referenceDate: { day: 10 } });
888888
expect(res.year).toBe(new Date().getFullYear());
889889
expect(res.day).toBe(10);
890890
});

0 commit comments

Comments
 (0)