Skip to main content

Module source_date

Module source_date 

Source
Expand description

The date of a paper’s source: the newest modification time among the TeX source files of the bundle it came in (Config::source_date_epoch), the clock ar5iv’s archival preload gives the job so \today prints the paper’s own date — the one arXiv’s PDF shows — and never the conversion’s (user ruling 2026-10-10).

Only the files the paper is typeset from count: the .tex sources, the macro files shipped beside them and the .bbl/.bib (a .bbl is written by the author’s last compile), plus the detected main file whatever its extension. Figures, compile by-products (.aux, .log, .synctex) and directories do not: a figure regenerated after the paper, or a directory the packer touched, is not the paper’s date. A time at or before the DOS epoch (1980-01-01, a zip entry’s “no time” — arXiv’s single-file submissions arrive so) is no date.

An archive’s entries are read for their recorded times, not the extracted files’ (extraction stamps its own clock): a zip entry’s Info-ZIP extended timestamp (0x5455, UTC) when it has one, else its DOS date and time read as UTC; a tar entry’s mtime. The result is deterministic per archive. A directory or single-file input reads the filesystem’s mtimes instead, which a checkout or a copy resets: deterministic only while the files are untouched.

Known limits: an entry dated in the future still wins (no clock is consulted, so the result stays deterministic); a single-file input counts only that file, not the files it \inputs; a directory walk skips version-control directories (.git, .svn, .hg, CVS); a .tar.gz is decompressed a second time for its dates.

Functions§

of_archive
The source date of an archive (.zip, .tar.gz/.tgz, .tar): the newest recorded time among its TeX source entries and main (the detected main file’s path inside the archive). None when no such entry carries a date, or the archive cannot be read.
of_directory
The source date of a directory input: the newest modification time among the TeX source files beneath dir and main.
of_file
The source date of a single-file input: its modification time.