Show HN: AlphaDec, a readable, lexically sortable time format for humans and AI

Hacker News - AI
Jul 19, 2025 18:57
firasd
1 views
hackernewsaidiscussion

Summary

AlphaDec is a new, human- and AI-friendly time format that encodes UTC timestamps into lexically sortable, readable strings by dividing the year into 26 periods (A-Z) and further subdivisions. This format enables efficient time-range queries, makes database key sorting straightforward, and is particularly useful for large language models (LLMs) in log analysis and time-based reasoning. Its design improves both machine processing and human interpretability of timestamps, offering practical benefits for AI applications that handle temporal data.

I designed AlphaDec, a timezone-agnostic time format that encodes UTC timestamps into chronologically sortable strings like `2025_O2H5_389232`. The key insight: by dividing the year into 26 periods (A-Z), then subdividing with numbers and letters, you get timestamps that sort naturally as strings while remaining human-readable. Some practical benefits I've found: - Perfect as prefixes for database keys - Time-range queries by truncation (`2024_M` finds everything in that ~14-day period) - LLM-friendly for log analysis and time-based reasoning - Glanceable - you can quickly see where in the year a timestamp falls Interesting emergent property: Periods F, M, S, and Z always bracket equinoxes/solstices, even in leap years. Live clock: https://firasd.github.io/alphadec/ GitHub: https://github.com/firasd/alphadec The readme has implementations in JavaScript and PHP. Would love feedback on the concept and where else this might be useful! Comments URL: https://news.ycombinator.com/item?id=446