Skip to content

Commit 248ad50

Browse files
m-reuterCopilot
andauthored
Update scripts/validate_posts.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 25dd2af commit 248ad50

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/validate_posts.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ for file in _posts/*.md; do
2424

2525
# Extract and validate date
2626
date_part="${filename:0:10}"
27-
if ! date -j -f "%Y-%m-%d" "$date_part" > /dev/null 2>&1; then
27+
if ! date -d "$date_part" "+%Y-%m-%d" > /dev/null 2>&1 && \
28+
! date -j -f "%Y-%m-%d" "$date_part" > /dev/null 2>&1; then
2829
echo "✗ Invalid date in filename: $filename"
2930
((error_count++))
3031
continue

0 commit comments

Comments
 (0)