A bit of inspiration for building YOUR Platform.

Dates in filenames

Cliff Brake December 20, 2024 #dates #naming #consistency

One of the most common labels we use today is dates. We use them in file names, reports, database fields, etc. There are many ways to enter a date:

RFC 3339 (YYYY-MM-DDTHH:MM:SS+HH:MM) is increasingly becoming an international standard. Many programming languages (Go, Rust, Javascript, Elm) support RFC 3339.

What about when naming files? It is often helpful to put a date in directory or file names so you can easily sort to find the latest or construct a timeline of events. In this case it makes sense to format the date general to specific YYYY-MM-DD and put the date at the beginning of the filename:

With a little thought, even simple things like file and directory names can become useful metadata that is easy to sort and query. Consistency and standards -- simple things you can do to make things better.