Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
velocityzen committed Jul 22, 2021
1 parent 7cee8ce commit c83b39d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "broadcast-calendar",
"name": "@viacomcbs/broadcast-calendar",
"version": "1.0.0",
"description": "Broadcast Calendar Dates Functions",
"author": "ViacomCBS",
Expand Down
4 changes: 2 additions & 2 deletions src/format.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DateTime, Interval } from "luxon";
import { BroadCastTimeZone, StringInterval } from "./types";
import { BroadcastTimeZone, StringInterval } from "./types";

export const makeFormatter = (format: string) => (date: DateTime): string =>
date.setZone(BroadCastTimeZone).toFormat(format);
date.setZone(BroadcastTimeZone).toFormat(format);

const dateFormat = makeFormatter("yyyy-MM-dd");

Expand Down
6 changes: 3 additions & 3 deletions src/parse.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { DateTime, Interval } from "luxon";
import { BroadCastTimeZone, StringInterval } from "./types";
import { BroadcastTimeZone, StringInterval } from "./types";

export function parseDateFromSQL(date: string): DateTime {
return DateTime.fromSQL(date, { zone: BroadCastTimeZone });
return DateTime.fromSQL(date, { zone: BroadcastTimeZone });
}

export function parseDateFromISO(date: string): DateTime {
return DateTime.fromISO(date, { zone: BroadCastTimeZone });
return DateTime.fromISO(date, { zone: BroadcastTimeZone });
}

export function parseIntervalFromSQL(range: StringInterval): Interval {
Expand Down
4 changes: 2 additions & 2 deletions src/range.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DateTime, Interval } from "luxon";

import { BroadCastTimeZone, YearQuarter } from "./types";
import { BroadcastTimeZone, YearQuarter } from "./types";

function getLastSunday(date: DateTime): DateTime {
return date.minus({ day: date.weekday % 7 });
Expand Down Expand Up @@ -53,7 +53,7 @@ export function getBroadcastQuarterRange(date: DateTime): Interval {
year: currentYear,
month: quarterStartMonth,
day: 1,
zone: BroadCastTimeZone,
zone: BroadcastTimeZone,
});

const start = getBroadcastWeekRange(startOfQuarterDate).start;
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export type YearQuarters = {
quarters: number[];
};

export const BroadCastTimeZone = "America/New_York";
export const BroadcastTimeZone = "America/New_York";

export type StringInterval = [string, string];

0 comments on commit c83b39d

Please sign in to comment.