fix: Format dates as YYYY-MM-DD in ft md exports instead of using raw string slice#63
Closed
ccage-simp wants to merge 1 commit into
Closed
fix: Format dates as YYYY-MM-DD in ft md exports instead of using raw string slice#63ccage-simp wants to merge 1 commit into
ccage-simp wants to merge 1 commit into
Conversation
|
Related #69 |
4254d94 to
6963ccf
Compare
Owner
|
reviewing |
6963ccf to
b7baddc
Compare
…of using raw string slice
b7baddc to
47103f4
Compare
Contributor
Author
|
Closing. Being considered in #53. |
Contributor
Author
Owner
|
Thanks for surfacing and patching this. The merged fix in #104 covers the markdown date regression end-to-end, including the broader export path we needed, so I’m closing this one as superseded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In v1.3.2, the new
ft mdcommand generates markdown files using a simple string slice on thepostedAtorbookmarkedAtdatabase field:date.slice(0, 10).While this works for standard ISO string timestamps (
2024-11-27), it fundamentally breaks for any user whose database still contains bookmarks in the legacy Twitter date format (Fri Apr 01 16:02:20 +0000 2022).For legacy timestamps, slicing the first 10 characters yields
Fri Apr 01. This results in markdown exports with filenames likeFri Apr 01-author-slug.mdwhich:The Fix
This PR replaces the raw string slice with a robust
Dateparser insrc/md-export.ts. It parses whatever timestamp format exists in the database and explicitly constructs a uniform, sortableYYYY-MM-DDprefix for every exported file.