# docs: fix set example description

The set() documentation example says setting hours: 12 changes 2014-09-01 01:23:45 to 12:00:00, but the example output correctly preserves the existing minutes and seconds as 12:23:45.

| | |
| --- | --- |
| Status | MERGED |
| Source | github:date-fns/date-fns#4206 |
| Original | https://github.com/date-fns/date-fns/pull/4206 |
| Workspace | Showcase |
| Tags | github, code, typescript |

## What it does

**A single-file change to index.ts, 2 lines.**

1 file changed across 1 area of date-fns/date-fns, 1 added and 1 removed.

The set() documentation example says setting hours: 12 changes 2014-09-01 01:23:45 to 12:00:00, but the example output correctly preserves the existing minutes and seconds as 12:23:45.

**Diagram: Where the change landed. Node size is not to scale; the line counts are exact.**

- date-fns (1 files, 2 lines) [accent]
- Source (1 file, 2 lines) [accent]
- index.ts (+1 −1) [bad]
- date-fns -> Source
- Source -> index.ts : heaviest

- **Heaviest file.** pkgs/core/src/set/index.ts, +1 −1, which is 100% of the change.
- **No test changed.** 1 source file changed with no accompanying test edit.
- **Spread.** 1 files, 2 changed lines in total.

## How it works

**The largest single edit is in index.ts.**

Quoted verbatim from the diff. This is the biggest hunk by changed lines, which is where a reviewer's attention usually belongs first.

**Diagram: Source files matched to test files by filename. A name-based match, so treat it as a prompt to look rather than as proof.**

- NO TEST CHANGED (1)
  - index.ts (+1 −1) [bad]
- TEST CHANGED TOO (0)
  - no source file paired [bad]

```typescript
@@ -40,7 +40,7 @@ export interface SetOptions<
  * //=> Tue Oct 20 2015 00:00:00
  *
  * @example
- * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:
+ * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:23:45:
  * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })
  * //=> Mon Sep 01 2014 12:23:45
  */
```

_pkgs/core/src/set/index.ts, +1 −1. The largest hunk in the largest file._

## File map

**Every file this change touches, heaviest first.**

Role is inferred from the path and risk from the path and the line count. Neither was read from the code.

| File | Role | Change | Risk |
| --- | --- | --- | --- |
| `pkgs/core/src/set/index.ts` | application code | modified, +1 −1 | low |

## Receipts

**Where each number above comes from.**

All of it is arithmetic over the file list and the check results, so it can be recomputed from the source.

- **Claim.** 1 files changed, +1 −1.
  - Evidence: pkgs/core/src/set/index.ts (+1 −1)
  - Where: https://github.com/date-fns/date-fns/pull/4206
- **Claim.** index.ts carries 100% of the changed lines.
  - Evidence: 2 of 2 changed lines
  - Where: pkgs/core/src/set/index.ts
- **Claim.** It arrived as 1 commit.
  - Evidence: docs: fix set example description
  - Where: commit 110fc52

## Where to attack

**What the shape of this diff suggests looking at first.**

These come from structure alone: which areas were touched, what was not touched alongside them, and what CI says. None of them is a judgement about the code.

- **Source changed with no test changed** (medium)
  - 1 source file changed and no test file moved with them. Existing tests may already cover this, or they may not; the diff cannot say which.
  - Mitigation: Confirm whether coverage already exists for the changed paths before approving.

## Merge order

**A reading order for the review, not a deployment plan.**

Ordered by how expensive each part is to get wrong, which is a structural property rather than an informed one.

1. **Then index.ts.** The largest single file in the change, +1 −1.
2. **Decide whether a test is needed.** Nothing in this change adds or edits one.

## What this brief could not check

- No language model read this change. Every statement here is computed from file paths, line counts, and CI status, so it describes the shape of the diff and not what the diff means.
- No test file changed, so nothing here is evidence that the change works.
