`{n}` path token uses the server time zone and renders `NaN` when no database is configured
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, node.js
Research direction
Start with endpoint-micropub/lib/utils.js around lines 76–84 and post-type-count.js around line 20; compare how {n} derives its date window with the sibling date tokens, and check the referenced issues #861 and #502 for prior decisions. Reproduce the timezone split and the missing database case. Done means {n} is consistent with the sibling path tokens and does not render NaN; the issue leaves the preferred date-range approach open for discussion.
Written by the indexing model from the issue text.
Description
endpoint-micropub/lib/utils.js:76 passes timeZone to getDateTokenValues; :83 doesn't
pass it to postTypeCount.get(), so post-type-count.js:20 derives the day from
toDateString(). For a post stored 2026-10-10T23:30:00+02:00:
TZ |
window queried (UTC) |
|---|---|
UTC |
2026-10-10T00:00 .. 2026-10-11T00:00 |
Europe/Brussels |
2026-10-09T22:00 .. 2026-10-10T22:00 |
Two posts written on the author's own 10 October (00:30+02:00, 23:30+02:00) count together
under Europe/Brussels but split under UTC — both numbered 1, paths collide. Default
containers run UTC, so {n} disagrees with every date token beside it. Looks like #861
(beda3c02) in the one place it didn't reach.
Separately, utils.js:84 does tokens.n = count + 1 on the undefined that
postTypeCount.get() returns by design (#502, 71705df4), giving
2026/10/10/test-NaN.md.
Fixing the first means deciding what "the same day" is. Defining it as the day the sibling
path tokens already render would make this a string range on properties.published and
remove the aggregation — without normalising stored dates to Z, which would undo #280/#287.
Is that the direction you'd want?
- Dominant language
- JavaScript
- Stars
- 392
- Forks
- 39
- Avg merge
- 22h 29m
- Merged PRs (30d)
- 25
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getindiekit/indiekit
-
Docs: no path for someone who just wants to try IndiekitPossibly taken @rmdes claimed this 13 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
getindiekit/indiekit#1028 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
getindiekit/indiekit#1030 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
getindiekit/indiekit#1027 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 48/100
getindiekit/indiekit#1025 ·
Maintainers usually reply within 1 day
-
plugin-syndicator
Difficulty 4/5 3-5 days Newbie friendliness 48/100
getindiekit/indiekit#1022 · 1 reaction ·
Maintainers usually reply within 1 day
All issues in getindiekit/indiekit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
scratchfoundation/scratch-editor#754 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 96/100
google/site-kit-wp#14102 ·
Maintainers usually reply within 2 days
-
area:growth priority:P1 type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
tecnologiasantos/bogoboom#66 ·
Maintainers usually reply within 1 day
-
desktop docs good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
npm/write-file-atomic#245 ·