You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libfec's fastfec subcommand passes date values through as raw FEC format (YYYYMMDD), while FastFEC converts them to ISO 8601 format (YYYY-MM-DD). This affects every filing and every form type that contains date fields (coverage dates, contribution dates, disbursement dates, etc.).
Note: FastFEC's date conversion is itself inconsistent - it fails to convert dates on H3 and H4 form types, leaving those as raw YYYYMMDD.
# Cover record date fields:
diff \
<(sed -n '2p' /tmp/out_libfec/1935668/F3XN.csv | tr ',''\n'| sed -n '14,15p') \
<(sed -n '2p' /tmp/out_fastfec/1935668/F3XN.csv | tr ',''\n'| sed -n '14,15p')# < 20251201# < 20251231# ---# > 2025-12-01# > 2025-12-31# Itemization date fields:
diff \
<(awk -F, '{print $20}' /tmp/out_libfec/1935668/SA11AI.csv | head -5) \
<(awk -F, '{print $20}' /tmp/out_fastfec/1935668/SA11AI.csv | head -5)# < 20251205# ---# > 2025-12-05# Show FastFEC's own inconsistency on H3/H4 (filing 1942420):
libfec fastfec ~/.cache/libfec/cache/1942420.fec /tmp/out_libfec_2
fastfec --no-stdin ~/.cache/libfec/cache/1942420.fec /tmp/out_fastfec_2
awk -F, '{print $8}' /tmp/out_fastfec_2/1942420/H3.csv
# date_of_receipt# 20251219 <-- FastFEC left this unconverted!
awk -F, '{print $20}' /tmp/out_fastfec_2/1942420/SA11AI.csv | head -2
# contribution_date# 2025-12-13 <-- But converted this one
Decision
If the goal is exact FastFEC compatibility, add date conversion (YYYYMMDD -> YYYY-MM-DD) in the fastfec writer for all form types. The try_format_fec_date() function already exists in fec-parser/src/lib.rs but is only used by the SQLite export path.
If the goal is correctness over compatibility, raw passthrough is arguably more faithful to the source data.
Note
Much of this ticket was composed with Claude
Description
libfec's
fastfecsubcommand passes date values through as raw FEC format (YYYYMMDD), while FastFEC converts them to ISO 8601 format (YYYY-MM-DD). This affects every filing and every form type that contains date fields (coverage dates, contribution dates, disbursement dates, etc.).Note: FastFEC's date conversion is itself inconsistent - it fails to convert dates on
H3andH4form types, leaving those as rawYYYYMMDD.Affected Filing
Filing ID: 1935668 (237KB, Chevron PAC F3XN filing)
Reproduction
Observe the Difference
Decision
If the goal is exact FastFEC compatibility, add date conversion (
YYYYMMDD->YYYY-MM-DD) in the fastfec writer for all form types. Thetry_format_fec_date()function already exists infec-parser/src/lib.rsbut is only used by the SQLite export path.If the goal is correctness over compatibility, raw passthrough is arguably more faithful to the source data.