Skip to content

Commit

Permalink
test: adjusts test hours
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-schroeder committed Feb 14, 2024
1 parent 58ac112 commit d712d0f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
25 changes: 12 additions & 13 deletions docs/components/content/Modify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ const fns: Record<
example: "date",
tip: 'To produce a date in a given timezone either include the offset in the date string (ex: "2021-01-01T00:00:00-0800") or use the <code>tzDate</code> function.',
},
minuteStart: {
description: `Returns a new Date object with the seconds part of the time set to 00.000 (local time).`,
dayEnd: {
description: `Returns a new Date object with the time set to 23:59:59.999 (local time).`,
return: "Date",
arguments: [
{
Expand All @@ -161,8 +161,8 @@ const fns: Record<
},
],
},
minuteEnd: {
description: `Returns a new Date object with the seconds part of the time set to 59.999 (local time).`,
dayStart: {
description: `Returns a new Date object with the time set to 00:00:00.000 (local time).`,
return: "Date",
arguments: [
{
Expand All @@ -171,8 +171,8 @@ const fns: Record<
},
],
},
hourStart: {
description: `Returns a new Date object with the minutes part of the time set to 00:00.000 (local time).`,
hourEnd: {
description: `Returns a new Date object with the minutes part of the time set to 59:59.999 (local time).`,
return: "Date",
arguments: [
{
Expand All @@ -181,8 +181,8 @@ const fns: Record<
},
],
},
hourEnd: {
description: `Returns a new Date object with the minutes part of the time set to 59:59.999 (local time).`,
hourStart: {
description: `Returns a new Date object with the minutes part of the time set to 00:00.000 (local time).`,
return: "Date",
arguments: [
{
Expand All @@ -191,19 +191,18 @@ const fns: Record<
},
],
},
dayStart: {
description: `Returns a new Date object with the time set to 00:00:00.000 (local time).`,
minuteEnd: {
description: `Returns a new Date object with the seconds part of the time set to 59.999 (local time).`,
return: "Date",
arguments: [
{
name: "date",
type: "string | Date",
},
],
},
dayEnd: {
description: `Returns a new Date object with the time set to 23:59:59.999 (local time).`,
minuteStart: {
description: `Returns a new Date object with the seconds part of the time set to 00.000 (local time).`,
return: "Date",
arguments: [
{
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/hourEnd.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process.env.TZ = "America/New_York"
describe("hourEnd", () => {
it("can become the end of the hour", () => {
expect(hourEnd("2023-02-22T12:30:00Z").toISOString()).toBe(
"2023-02-22T17:59:59.999Z"
"2023-02-22T12:59:59.999Z"
)
})
})
2 changes: 1 addition & 1 deletion src/__tests__/hourStart.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process.env.TZ = "America/New_York"
describe("hourStart", () => {
it("can become the start of the hour", () => {
expect(hourStart("2023-02-22T12:30:00Z").toISOString()).toBe(
"2023-02-22T17:00:00.000Z"
"2023-02-22T12:00:00.000Z"
)
})
})
2 changes: 1 addition & 1 deletion src/__tests__/minuteEnd.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process.env.TZ = "America/New_York"
describe("minuteEnd", () => {
it("can become the end of the hour", () => {
expect(minuteEnd("2023-02-22T12:30:30Z").toISOString()).toBe(
"2023-02-22T17:30:59.999Z"
"2023-02-22T12:30:59.999Z"
)
})
})
2 changes: 1 addition & 1 deletion src/__tests__/minuteStart.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process.env.TZ = "America/New_York"
describe("minuteStart", () => {
it("can become the start of the minute", () => {
expect(minuteStart("2023-02-22T12:30:30Z").toISOString()).toBe(
"2023-02-22T17:30:00.000Z"
"2023-02-22T12:30:00.000Z"
)
})
})

0 comments on commit d712d0f

Please sign in to comment.